LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using iphlpapi.dll

Hallo,
 
i had a question about using the iphlpapi dll. I want to use the GetAdaptersAddresses Function, because this function pointers to a buffer (struct) with adapter information. Like the adaptername and ip information etc.
 
And its about this function:
ULONG WINAPI GetAdaptersAddresses(
  __in     ULONG Family,
  __in     ULONG Flags,
  __in     PVOID Reserved,
  __inout  PIP_ADAPTER_ADDRESSES AdapterAddresses,
  __inout  PULONG SizePointer
);
my problem is how to abstract that pointer information and what kind of configuration i need in the call libary function node. i'm out of idea's. Maybe some guys or girls have one:)
with the attachment there is a little file vi, what i've made.
Thanks
0 Kudos
Message 1 of 4
(3,322 Views)
Hi,

I had a similar problem. The problem is that labview has a different memory management compared to c++...so you can only get compatibility for "simple" data types. To get a workaround, i wrote a wrapper dll...you can write a c++-dll yourself containing an interface to the iphlpapi dll. Create functions containing simple data types and building out of these simple types your complete structure for iphlpapi. Pass this structure to the dll.

For more information how to write C++-Dlls that can be used with labview, theres a good PDF from NI: Using external code with labview.

Good luck!

Christian

THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 2 of 4
(3,285 Views)
yes..
 
I where started with writing a wrapper dll. thanks for the tip.
greets
 
JB
0 Kudos
Message 3 of 4
(3,276 Views)

Hi Christian and JB,

maybe this link is interesting for you: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=184616#M184616

Mike

0 Kudos
Message 4 of 4
(3,274 Views)