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 "OVERLAPPED" in [All]

setupapi

.

ByVal OverlappedPtr As Long) As Long

.

ByVal OverlappedPtr As Long) As Long

iphlpapi

.

static extern int EnableRouter(IntPtr pHandle, ref System.Threading.NativeOverlapped pOverlapped);

.

    Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer

.

    Public Structure OVERLAPPED

.

    Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer

.

    Private pOverlapped As OVERLAPPED ' <- Important! This should also be used when calling UnenableRouter() API Function.

.

    ' OVERLAPPED strucutre fields can be NULLED except hEvent field.

.

    pOverlapped.hEvent = CreateEvent(IntPtr.Zero, False, False, "enablerouter")

.

    Dim RetVal As Integer = EnableRouter(IntPtr.Zero, pOverlapped)

.

static extern int UnenableRouter(ref System.Threading.NativeOverlapped pOverlapped, IntPtr lpdwEnableCount);

.

    Public Shared Function UnenableRouter(pOverlapped As IntPtr, ByRef lpdwEnableCount As Long) As Integer

.

    Public Structure OVERLAPPED

.

    Public Shared Function UnenableRouter(pOverlapped As IntPtr, ByRef lpdwEnableCount As Long) As Integer

.

    Private pOverlapped As OVERLAPPED <- Important! Created from EnableRouter() call.

.

    Dim pOverlappedPtr As IntPtr

.

        size = Marshal.SizeOf(pOverlapped)

.

        If pOverlapped.hEvent = IntPtr.Zero Then Exit Sub ' We don't have the handle.

.

        pOverlappedPtr = Marshal.AllocHGlobal(size)

.

        Marshal.StructureToPtr(pOverlapped, pOverlappedPtr, True)

.

        RetVal = UnenableRouter(pOverlappedPtr, count)

.

        If pOverlappedPtr <> IntPtr.Zero Then CloseHandle(pOverlapped.hEvent)

.

        Marshal.FreeHGlobal(pOverlappedPtr)

hid

.

deviceHandle = CreateFile(devicePath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero);

Enums

.

    /// This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette.

.

    '''This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette. This message enables windows that do not have the keyboard focus to realize their logical palettes and update their client areas.

.

    /// <summary>Specifies an overlapped window.</summary>

.

    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,

.

    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,

.

    ''' <summary>Specifies an overlapped window.</summary>

.

    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE

.

    WS_EX_OVERLAPPEDWINDOW As Long = WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE

.

    /// <summary>Specifies an overlapped window.</summary>

.

    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,

.

    ''' <summary>Specifies an overlapped window.</summary>

.

    WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE

.

    WS_EX_OVERLAPPEDWINDOW As Long = WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE

Structures

.

public struct NativeOverlapped

.

public struct OVERLAPPED

.

Structure OVERLAPPED  

.
Documentation
OVERLAPPED @msdn on MSDN
.

struct OVERLAPPED {

.

Public Structure OVERLAPPED

.

EventHandle: Specifies the handle to an event set to the signaled state when the operation is complete. The calling process must set this member either to zero or to a valid event handle before calling any overlapped functions.

.

This structure is already defined as System.Threading.NativeOverlapped in the .NET Framework. It is not supported for the .NET Compact Framework.

.
Documentation
[OVERLAPPED] on MSDN
.

        IntPtr lpOverlapped

.

    IntPtr Overlapped);

rapi

.

    int lpOverlapped);

.

    int lpOverlapped);

Constants

.

private const uint FILE_FLAG_OVERLAPPED      = 0x40000000;

.

        public const uint WS_OVERLAPPED       = 0x00000000;

.

        public const uint WS_TILED        = WS_OVERLAPPED;

.

        public const uint WS_TILEDWINDOW      = WS_OVERLAPPEDWINDOW;

.

        public const uint WS_OVERLAPPEDWINDOW =

.

            ( WS_OVERLAPPED  |

.

        public const uint WS_EX_OVERLAPPEDWINDOW  = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE);

.

    WS_OVERLAPPED      = 0x00000000,

.

    WS_TILED           = WS_OVERLAPPED,

.

    WS_TILEDWINDOW     = WS_OVERLAPPEDWINDOW,

.

    WS_OVERLAPPEDWINDOW    = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,

.

    WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE),

.

  WS_OVERLAPPED = 0

.

  WS_TILED = WS_OVERLAPPED

.

  WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW

.

  WS_OVERLAPPEDWINDOW = WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or _

.

  WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE

.

        /// Overlapped I/O event is not in a signaled state.

.

        /// Overlapped I/O operation is in progress.

17: WM
.
WM_PALETTECHANGED 0x311 This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette. This message enables windows that do not have the keyboard focus to realize their logical palettes and update their client areas.

ws2_32

.

        IntPtr lpOverlapped, IntPtr lpCompletionRoutine);

.

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

kernel32

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

        FILE_FLAG_OVERLAPPED = 0x40000000,

.

        IntPtr lpOverlapped                    // overlapped structure

.

        byte[] buffer, uint toRead, ref uint read, IntPtr lpOverLapped);

.

        byte[] buffer, uint count, ref uint written, IntPtr lpOverlapped);

.

    private const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;

.

out uint lpBytesReturned, IntPtr lpOverlapped);

.

        [In] ref NativeOverlapped lpOverlapped);

.

        [In] ref System.Threading.NativeOverlapped Overlapped

.

    Shared Function DeviceIoControl(ByVal hDevice As IntPtr, ByVal dwIoControlCode As UInteger, ByVal lpInBuffer As IntPtr, ByVal nInBufferSize As UInteger, ByVal lpOutBuffer As IntPtr, ByVal nOutBufferSize As UInteger, ByRef lpBytesReturned As UInteger, ByVal lpOverlapped As IntPtr) As Boolean

.

    <[In]()> ByRef lpOverlapped As NativeOverlapped) As Boolean

.

    ByRef Overlapped As System.Threading.NativeOverlapped) As Boolean

.

lpOverlapped - Main use in asynchronous deviceIoControl. NativeOverlapped is the managed version of the structure and use is the same. The difference between NativeOverlapped and Overlapped is managed Struct vs managed Class respectively. NativeOverlapped was more condusive for one-way device driver communication. Convert from Overlapped to NativeOverlapped to make the call, since NativeOverlapped is explicitly defined to mimic the unmanaged Overlapped structure.

.

Pin your NativeOverlapped structure, DeviceIoControl is asynchronous and will write into the overlapped structure upon completion of IO requested. If you NativeOverlapped structure has been moved by garbage collection it will write into the wrong area causing heap corruption.

.

If you want x64 proccessor support, you CANNOT use the System.Threading.NativeOverlapped structure as a ref parameter described above. The overlap structure must be allocated in global memory space. See the section "DeviceIoControl w/x64 support":

.

public bool DeviceIoControl( IntPtr hDevice, uint dwIoControlCode, ref long buffer, int bufferSize, ref NativeOverlapped pOverlapped)

.

    return DeviceIoControl( hDevice, dwIoControlCode, ref buffer, bufferSize, ref buffer, bufferSize, ref NoReturn, ref pOverlapped );

.

    [In] IntPtr Overlapped

.

    internal class DeviceIoOverlapped

.

    private IntPtr mPtrOverlapped = IntPtr.Zero;

.

    public DeviceIoOverlapped()

.

        // Globally allocate the memory for the overlapped structure

.

        mPtrOverlapped = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (NativeOverlapped)));

.

        // Find the structural starting positions in the NativeOverlapped structure.

.

        mFieldOffset_InternalLow = Marshal.OffsetOf(typeof (NativeOverlapped), "InternalLow").ToInt32();

.

        mFieldOffset_InternalHigh = Marshal.OffsetOf(typeof (NativeOverlapped), "InternalHigh").ToInt32();

.

        mFieldOffset_OffsetLow = Marshal.OffsetOf(typeof (NativeOverlapped), "OffsetLow").ToInt32();

.

        mFieldOffset_OffsetHigh = Marshal.OffsetOf(typeof (NativeOverlapped), "OffsetHigh").ToInt32();

.

        mFieldOffset_EventHandle = Marshal.OffsetOf(typeof (NativeOverlapped), "EventHandle").ToInt32();

.

        get { return Marshal.ReadIntPtr(mPtrOverlapped, mFieldOffset_InternalLow); }

.

        set { Marshal.WriteIntPtr(mPtrOverlapped, mFieldOffset_InternalLow, value); }

.

        get { return Marshal.ReadIntPtr(mPtrOverlapped, mFieldOffset_InternalHigh); }

.

        set { Marshal.WriteIntPtr(mPtrOverlapped, mFieldOffset_InternalHigh, value); }

.

        get { return Marshal.ReadInt32(mPtrOverlapped, mFieldOffset_OffsetLow); }

.

        set { Marshal.WriteInt32(mPtrOverlapped, mFieldOffset_OffsetLow, value); }

.

        get { return Marshal.ReadInt32(mPtrOverlapped, mFieldOffset_OffsetHigh); }

.

        set { Marshal.WriteInt32(mPtrOverlapped, mFieldOffset_OffsetHigh, value); }

.

    /// The overlapped event wait handle.

.

        get { return Marshal.ReadIntPtr(mPtrOverlapped, mFieldOffset_EventHandle); }

.

        set { Marshal.WriteIntPtr(mPtrOverlapped, mFieldOffset_EventHandle, value); }

.

    /// Pass this into the DeviceIoControl and GetOverlappedResult APIs

.

    public IntPtr GlobalOverlapped

.

        get { return mPtrOverlapped; }

.

    /// Set the overlapped wait handle and clear out the rest of the structure.

.

    /// <param name="hEventOverlapped"></param>

.

    public void ClearAndSetEvent(IntPtr hEventOverlapped)

.

        EventHandle = hEventOverlapped;

.

    ~DeviceIoOverlapped()

.

        if (mPtrOverlapped != IntPtr.Zero)

.

        Marshal.FreeHGlobal(mPtrOverlapped);

.

        mPtrOverlapped = IntPtr.Zero;

.

  DeviceIoOverlapped deviceIoOverlapped = new DeviceIoOverlapped();

.

  deviceIoOverlapped.ClearAndSetEvent(hEvent.SafeWaitHandle.DangerousGetHandle());

.

  DeviceIoControl(hDevice, iCtlCode, inBuffer, inSize, outBuffer, outSize, out ret, deviceIoOverlapped.GlobalOverlapped)

.

The DeviceIoControl API must declare an IntPtr for the OVERLAPPED parameter. All other deviations are OK.

.

   Private Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByRef lpInBuffer As IntPtr,   ByVal nInBufferSize As Integer, ByRef lpOutBuffer As IntPtr, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As IntPtr) As Integer

.

   Private Declare Ansi Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByVal lpInBuffer As Integer, ByVal nInBufferSize As Integer, ByRef lpOutBuffer As Integer, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As Integer) As Integer

.

   Private Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByRef lpInBuffer As IntPtr, ByVal nInBufferSize As Integer, ByRef lpOutBuffer As DISK_GEOMETRY, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As IntPtr) As Integer

.

   Private Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByRef lpInBuffer As IntPtr, ByVal nInBufferSize As Integer, ByRef lpOutBuffer As GETVERSIONOUTPARAMS, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As IntPtr) As Integer

.

   Private Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByRef lpInBuffer As SENDCMDINPARAMS, ByVal nInBufferSize As Integer, ByRef lpOutBuffer As IntPtr, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As IntPtr) As Integer

.
Summary
.

static extern bool GetOverlappedResult(IntPtr hFile,

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped,

.

Private Shared Function GetOverlappedResult(ByVal hFile As IntPtr, <[In]()> ByRef lpOverlapped As System.Threading.NativeOverlapped, ByRef lpNumberOfBytesTransferred As UInteger, ByVal bWait As Boolean) As Boolean

.

Warning! GetOverlappedResult writes to the address of the buffer specified in the ORIGINAL OPERATION (ie/ ReadFile or WriteFile). .NET may move the address of the buffer before GetOverlappedResult returns, resulting in a buffer overflow. Use AllocHGlobal and FreeHGlobal or otherwise ensure the buffer is pinned between the two calls.

.

        NativeOverlapped lpOverlapped = new NativeOverlapped();

.

        if (!WriteFile(hDevice, pBuffer, dwBytesToWrite, ref lpNumberOfBytesWritten, ref lpOverlapped) &&

.

        return GetOverlappedResult(hDevice, ref lpOverlapped, ref lpNumberOfBytesWritten, true);

.
Documentation
[GetOverlappedResult] on MSDN
.

   lpNumberOfBytes, out UIntPtr lpCompletionKey, out IntPtr lpOverlapped,

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

https://msdn.microsoft.com/en-us/library/system.threading.nativeoverlapped(v=vs.110).aspx

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

   lpBytesReturned, IntPtr lpOverlapped,

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

  IntPtr lpReserved, NativeOverlapped* lpOverlapped);

.

The documentation for the Scatter/Gather functions states that the buffer addresses used must be page aligned (not just storage aligned). Indeed, passing a managed allocation, such as a byte array, causes error 87 (Invalid Parameter). This function is asynchronous only so an use the AsyncResult and Overlapped pattern established by the FileStream.

.

   uint nNumberOfBytesToRead, [In] ref System.Threading.NativeOverlapped lpOverlapped,

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

    Overlapped = 0x40000000,

.

   IntPtr lpBytesRead, IntPtr lpOverlapped);

.

  ref int lpBytesRead, IntPtr lpOverlapped);

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

   IntPtr lpOverlapped);

.

    Public Function WaitCommEvent(ByVal hFile As Integer, ByRef Mask As Integer, ByRef lpOverlap As Overlapped) As Int32

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

  IntPtr lpReserved, System.Threading.NativeOverlapped* lpOverlapped);

.

The documentation for the Scatter/Gather functions states that the buffer addresses used must be page aligned (not just storage aligned). Indeed, passing a managed allocation, such as a byte array, causes error 87 (Invalid Parameter). This function is asynchronous only so an use the AsyncResult and Overlapped pattern established by the FileStream.

.

   uint nNumberOfBytesToWrite, [In] ref System.Threading.NativeOverlapped lpOverlapped,

.

    UInt32 dwNumberOfBytesTransfered, ref NativeOverlapped lpOverlapped);

.

    uint nNumberOfBytesToWrite, [In] ref NativeOverlapped lpOverlapped,

.

    NativeOverlapped ol = new NativeOverlapped();

.

  private static void callback(UInt32 dwErrorCode, UInt32 dwNumberOfBytesTransfered, ref NativeOverlapped lpOverlapped)

.

   [In] ref System.Threading.NativeOverlapped lpOverlapped);

.

  IntPtr lpReserved, System.Threading.NativeOverlapped* lpOverlapped);

.

The documentation for the Scatter/Gather functions states that the buffer addresses used must be page aligned (not just storage aligned). Indeed, passing a managed allocation, such as a byte array, causes error 87 (Invalid Parameter). This function is asynchronous only so an use the AsyncResult and Overlapped pattern established by the FileStream.

user32

.

The AnyPopup function indicates whether an owned, visible, top-level pop-up, or overlapped window exists on the screen. The function searches the entire screen, not just the calling application's client area.

.

/// The CreateWindowEx function creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function.

.

/// <param name="x">Specifies the initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If x is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.</param>

.

/// <param name="y">Specifies the initial vertical position of the window. For an overlapped or pop-up window, the y parameter is the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window, y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left corner of the parent window's client area. For a list box y is the initial y-coordinate of the upper-left corner of the list box's client area relative to the upper-left corner of the parent window's client area.

.

/// <para>If an overlapped window is created with the WS_VISIBLE style bit set and the x parameter is set to CW_USEDEFAULT, then the y parameter determines how the window is shown. If the y parameter is CW_USEDEFAULT, then the window manager calls ShowWindow with the SW_SHOW flag after the window has been created. If the y parameter is some other value, then the window manager calls ShowWindow with that value as the nCmdShow parameter.</para></param>

.

/// <param name="nWidth">Specifies the width, in device units, of the window. For overlapped windows, nWidth is the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinates to the right edge of the screen; the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, the nWidth and nHeight parameter are set to zero.</param>

.

/// <param name="nHeight">Specifies the height, in device units, of the window. For overlapped windows, nHeight is the window's height, in screen coordinates. If the nWidth parameter is set to CW_USEDEFAULT, the system ignores nHeight.</param> <param name="hWndParent">Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows.

.

/// <param name="hMenu">Handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window.</param>

.

''' The CreateWindowEx function creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function.

.

''' <param name="x">Specifies the initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If x is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero.</param>

.

''' <param name="y">Specifies the initial vertical position of the window. For an overlapped or pop-up window, the y parameter is the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window, y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left corner of the parent window's client area. For a list box y is the initial y-coordinate of the upper-left corner of the list box's client area relative to the upper-left corner of the parent window's client area.

.

''' <para>If an overlapped window is created with the WS_VISIBLE style bit set and the x parameter is set to CW_USEDEFAULT, then the y parameter determines how the window is shown. If the y parameter is CW_USEDEFAULT, then the window manager calls ShowWindow with the SW_SHOW flag after the window has been created. If the y parameter is some other value, then the window manager calls ShowWindow with that value as the nCmdShow parameter.</para></param>

.

''' <param name="nWidth">Specifies the width, in device units, of the window. For overlapped windows, nWidth is the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinates to the right edge of the screen; the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, the nWidth and nHeight parameter are set to zero.</param>

.

''' <param name="nHeight">Specifies the height, in device units, of the window. For overlapped windows, nHeight is the window's height, in screen coordinates. If the nWidth parameter is set to CW_USEDEFAULT, the system ignores nHeight.</param> <param name="hWndParent">Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows.

.

''' <param name="hMenu">Handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window.</param>

.

                WindowStylesEx.WS_EX_OVERLAPPEDWINDOW,

.

                WindowStyles.WS_OVERLAPPEDWINDOW, // window style

coredll

.

            IntPtr lpOverlapped);

.

                         ByRef lpBytesReturned As Integer, ByVal lpOverlapped As Integer) As Integer

.

        out UInt32 lpNumberOfBytesWritten, IntPtr lpOverlapped);

.

    ByVal lpOverlapped As Long) As Long

httpapi

.

     IntPtr pOverlapped);

.

     IntPtr pOverlapped);

.

     IntPtr pOverlapped);

.

         IntPtr pOverlapped);

.

        IntPtr pOverlapped);


 
Access PInvoke.net directly from VS: