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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "code" in [All]

ws2_32

.

Sample Code:

2: 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:

.

Sample Code:

10: 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,

18: listen
.

Sample Code:

.

Sample Code:

20: ntohl
.

Sample Code:

21: ntohs
.

Sample Code:

22: ntohs
.

Sample Code:

.

Sample Code:

24: recv
.

Sample Code:

25: select
.

Sample Code:

26: send
.

If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by len. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

.

Sample Code:

27: SendTo
.

If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by len. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

.

Sample Code:

.

Sample Code:

.

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

.

Sample Code:

30: socket
.

Sample Code:

.

Sample Code:

.

Sample Code:

.

        /// Receive ECN codepoints in the IP header

.

        /// Receive ECN codepoints in the IP header.

.

Sample Code:

.

Sample Code:

.

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

.

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

.

Sample Code:

.

C# Sample Code:

.

</code>

.

VB Sample Code:

.

    Dim resultCode As Integer = 0

.

    resultCode = WSAStartup(WORD_VERSION, data)

.

    If (resultCode = SUCCESS) Then

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

        IntPtr s, System.Net.Sockets.IOControlCode dwIoControlCode,

.

Sample Code:

.

            this.socketPtr, Native.ControlCode.FIONREAD,

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

static extern Int32 WSAIoctl(Int32 s, UInt32 dwControlCode, IntPtr lpvInBuffer, Int32 cbInBuffer, IntPtr lpvOutBuffer, Int32 cbOutBuffer, out UInt32 lpcbBytesReturned, IntPtr lpOverlapped, IntPtr lpCompletion);

.

Sample Code:

.

Sample Code:

.

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

.

Sample Code:

.

Sample Code:

.

              CharSet = CharSet.Unicode,

.

Sample Code:

rpcrt4

.

Sample Code:

.

Sample Code in C#:

.

Sample Code in VB:

.

   Dim code As Integer

.

   code = UuidCreateSequential(myId)

.

   If code <> 0 Then

.

     Console.WriteLine("UuidCreateSequential failed: {0}", code)

.

Sample Code in C#:

.

Sample Code in VB:

.

   Dim code As Integer

.

   code = UuidCreateSequential(myId)

.

   If code <> 0 Then

.

     Console.WriteLine("UuidCreateSequential failed: {0}", code)

.

There is an Unicode version call UuidFromStringW

.

Sample Code:

cfgmgr32

.

Sample Code:

.

    CharSet:=CharSet.Unicode, _

.

Sample Code:

.

Sample Code:

.

Sample Code:

.

[DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]

.

Sample Code:

.

[DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]

.

[DllImport("CfgMgr32.dll", CharSet = CharSet.Unicode)]

.

Sample Code:

.

    CharSet:=CharSet.Unicode, _

.

Sample Code:

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


 
Access PInvoke.net directly from VS: