how to get the MAC address by .net program if the OS is win98?

  • Thread starter Thread starter Cyrus
  • Start date Start date
is p/invoke is only for c++, is it ok for vb.net?
do i need to install Netbios in win98?
 
when i add reference to my xxx.dll
it turn my dll to Interop.xxx.dll
and said that can not find my entry point to my function
what should i do? many thz


Cyrus said:
is p/invoke is only for c++, is it ok for vb.net?
do i need to install Netbios in win98?


Herfried K. Wagner said:
* "Cyrus" <[email protected]> scripsit:
[...]

You may want to translate this VB6 sample using p/invoke on 'Netbios' to
(VB).NET:

<http://www.gssg.de/macadr.zip>
 
* "Cyrus said:
when i add reference to my xxx.dll
it turn my dll to Interop.xxx.dll
and said that can not find my entry point to my function

What's "xxx.dll"? Is it a standard DLL? Then you won't need a
reference, youcan use the functions using 'Declare' or 'DllImport'.
 
I declare as following

[DllImport('netapi32.dll', CharSet = CharSet.Ansi, SetLastError = True, EntryPoint = 'NETBIOS')]
function Netbios(ref NCB: tNCB): byte; external;

but the runtime always complaint can't find NETBIOS entry at netapi32.dll,

when I run a C++ without dotnet, it's ok.
 
Back
Top