Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "code" in [All]

wlanapi

.

Sample Code:

.

Sample Code:

.

Managed Wifi - http://managedwifi.codeplex.com/

.

Sample Code:

.

[DllImport("Wlanapi.dll", SetLastError = true, CharSet = CharSet.Unicode)]

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

     WLAN_HOSTED_NETWORK_OPCODE OpCode,

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

        WLAN_INTF_OPCODE OpCode,

.

        IntPtr pWlanOpcodeValueType);

.

    <[In]> ByRef pInterfaceGuid As Guid, ByVal OpCode As WLAN_INTF_OPCODE, _

.

    ByRef ppData As IntPtr, ByVal pWlanOpcodeValueType As IntPtr) As UInteger

.

WLAN_INTF_OPCODE

.

There is a managed WiFi API available on codeplex http://managedwifi.codeplex.com/

.

Depending on the opcode, the data returned in the memory pointed to by ppData can be:

.

Sample Code:

.

            if (WlanQueryInterface(handle, ref guid, WLAN_INTF_OPCODE.wlan_intf_opcode_current_connection, IntPtr.Zero, out dataSize, ref ptr, IntPtr.Zero) != 0)

.

         If WlanQueryInterface(handle, guid, WLAN_INTF_OPCODE.wlan_intf_opcode_current_connection, IntPtr.Zero, dataSize, ptr, _

.

[DllImport("Wlanapi.dll",SetLastError = true,CharSet = CharSet.Unicode)]

.

public static extern uint WlanReasonCodeToString(uint dwReasonCode,uint dwBufferSize,string pStringBuffer,IntPtr pReserved);

.

Declare Function WlanReasonCodeToString Lib "wlanapi.dll" (TODO) As TODO

.

Sample Code:

.

uint pwdReasonCode=524289,dwBufferSize=64;

.

WlanReasonCodeToString(pwdReasonCode,dwBufferSize,pStringBuffer,new IntPtr());

.
Documentation
[WlanReasonCodeToString] on MSDN
.

Sample Code:

.

Sample Code:

.

Sample Code:

.

      uint resultCode = WlanScan(wlanHndl, ref g, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);

.

      if (resultCode != 0)

.

public static extern uint WlanSetInterface(IntPtr hClientHandle,ref Guid pInterfaceGuid,WLAN_INTF_OPCODE OpCode,uint dwDataSize,ref object obj ,IntPtr pReserved);

.

WLAN_INTF_OPCODE

.

Sample Code:

.

[DllImport("Wlanapi.dll",SetLastError = true,CharSet = CharSet.Unicode)]

.

Sample Code:

.

[DllImport("Wlanapi.dll",SetLastError = true,CharSet = CharSet.Unicode)]

.

Sample Code:

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

Sample Code:

.

Sample Code:

quickusb

.

Also, see the Managed wrapper class CsQuickUSB http://code.google.com/p/csquickusb/

.

QuickUsb.dll is not unicode friendly, make sure you use ANSI encodings on your pinvoke calls!

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

ws2_32

39: accept
.

Sample Code:

40: bind
.

Sample Code:

.

    int resultCode = 0;            //Result of operation.

.

    int errorCode = 0;                //Resultant error.

.

                resultCode = bind(socketHandle, ref remoteAddress,

.

                errorCode = Marshal.GetLastWin32Error();

.

                returnValue = (resultCode == 0);

.

    [DllImport("ws2_32.dll", CharSet = CharSet.Unicode, SetLastError = true)]

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

    public enum ControlCode : int

.

Declare Function ControlCode Lib "ws2_32.dll" (TODO) As TODO

.

Sample Code:

.
Documentation
[ControlCode] on MSDN
.

Sample Code:

.

Sample Code:

47: htonl
.

Sample Code:

48: htons
.

Sample Code:

.

    [DllImport("Ws2_32.dll", CharSet = CharSet.Unicode, EntryPoint = "InetNtopW")]

.

    [DllImport("Ws2_32.dll", CharSet = CharSet.Unicode, EntryPoint = "InetNtopW")]

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

    [DllImport("Ws2_32.dll", CharSet = CharSet.Unicode, EntryPoint = "InetPtonW")]

.

    [DllImport("Ws2_32.dll", CharSet = CharSet.Unicode, EntryPoint = "InetPtonW")]

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

            this.socketPtr, Native.ControlCode.FIONREAD,

56: listen
.

Sample Code:

.

Sample Code:

58: ntohl
.

Sample Code:

59: ntohs
.

Sample Code:

60: ntohs
.

Sample Code:

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: