Wlanapi.dll Entrypoint not found exception

217 Views Asked by At

When I try to invoke WlanOpenHandle method of wlanapi.dll, code throws EntryPointNotFoundException.

C#:

[DllImport("wlanapi.dll", SetLastError = true)]
public static extern uint WlanOpenHandle([In] UInt32 clientVersion, [In, Out] IntPtr pReserved, [Out] out UInt32 negotiatedVersion, [Out] out IntPtr clientHandle);

C#:

uint dwClientVersion = 1;
IntPtr pReserved = IntPtr.Zero;
uint pdwNegotiatedVersion;
IntPtr phClientHandle;

var result = WlanOpenHandle(dwClientVersion, pReserved, out pdwNegotiatedVersion, out phClientHandle);

The web site says that entry point exist. What is the missing part?

0

There are 0 best solutions below