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

winmm

.

private void CloseCdCommand()

.

     mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);

.
Summary
The midiInClose function closes the specified MIDI input device
.

    private static extern uint midiInClose(IntPtr hMidiIn);

.
Documentation
[midiInClose] on MSDN
.

static extern uint midiOutClose(IntPtr hMidiOut);

.

Declare Function midiOutClose Lib "winmm.dll" (ByRef phMidiOut As IntPtr) As Uinteger

.
Documentation
[midiOutClose] on MSDN
.

The device should be disposed with midiOutClose when not needed anymore.

.

extern static Int32 midiStreamClose(IntPtr hMidiStream);

.

Public Declare Function midiStreamClose Lib "winmm.dll" (ByVal hMidiStream As IntPtr) As Integer

.
Documentation
[midiStreamClose] on MSDN
.

static extern Int32 mixerClose(IntPtr hmx);

.

Declare Function mixerClose Lib "winmm.dll" (ByVal hmx As IntPtr) As Integer

.
Documentation
[mixerClose] on MSDN
.

      oWriter.Close();

.
Summary
The waveInClose function closes the given waveform-audio input device.
.

static extern uint waveInClose(IntPtr hwi);

.

Shared Function waveInClose(<MarshalAs(UnmanagedType.I4)> ByVal hwi As Integer) As MMRESULT

.
Documentation
[waveInClose] on MSDN
.

public static extern uint waveOutClose(IntPtr hwo);

.

Declare Auto Function waveOutClose Lib "winmm.dll" (ByVal hwo As IntPtr) As UInteger

.
Documentation
[waveOutClose] on MSDN
.

I release the unmanaged memory allocated in the Open() method in the class's Close method:

.

        MM_WIM_CLOSE = 0x03BF,

.

  WIM_CLOSE = &H3BF

userenv

.

Upon successful return, the hProfile member of PROFILEINFO is a registry key handle opened to the root of the user's hive. It has been opened with full access (KEY_ALL_ACCESS). If a service that is impersonating a user needs to read or write to the user's registry file, use this handle instead of HKEY_CURRENT_USER. Do not close the hProfile handle. Instead, pass it to the UnloadUserProfile function. This function closes the handle. You should ensure that all handles to keys in the user's registry hive are closed. If you do not close all open registry handles, the user's profile fails to unload. For more information, see Registry Key Security and Access Rights and Registry Hives.

mpr

.

WNetCloseEnum

.

public static extern uint WNetCloseEnum(IntPtr hEnum);

.

Private Shared Function WNetCloseEnum(hEnum As IntPtr) As UInteger

.
Documentation
[WNetCloseEnum] on MSDN
.

  public static extern int WNetCloseEnum( IntPtr hEnum );

.

       iRet =WNetCloseEnum( ptrHandle );

.

    Public Function WNetCloseEnum(ByVal hEnum As IntPtr) As Integer

.

        iRet = WNetCloseEnum(ptrHandle)

.

        iRet = WNetCloseEnum(ptrHandle)

.

        iRet = WNetCloseEnum(ptrHandle)

winhttp

.

static extern bool WinHttpCloseHandle(IntPtr hInternet);

.

Declare Function WinHttpCloseHandle Lib "winhttp.dll" (ByVal hInternet As IntPtr) As Boolean

.
Documentation
[WinHttpCloseHandle] on MSDN
.

ERROR_WINHTTP_LOGIN_FAILURE - The login attempt failed. When this error is encountered, close the request handle with WinHttpCloseHandle. A new request handle must be created before retrying the function that originally produced this error.

.

ERROR_WINHTTP_OPERATION_CANCELLED - The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed.

shlwapi

.
Summary
PathQuoteSpaces - Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.
.

/// Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.

.

''' Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.

shell32

.

    /// Removes a thumbnail from an application's preview group when that tab or document is closed in the application.

.

    'Eventhandler Form Close

.

        SEE_MASK_NOCLOSEPROCESS = 0x00000040,

dtl

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

Declare Function DTL_DRIVER_CLOSE Lib "dtl.dll" (TODO) As TODO

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    public void CloseDriver()

.

        Dtl.DtlDriverClose(_driverId, TimeoutInMs);

.
Documentation
[DTL_DRIVER_CLOSE] on MSDN
.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

.

    /// Close Dtl driver

.

    /// <param name="driverId">specifies driver to close</param>

.

    public static int DtlDriverClose(int driverId, int timeOut)

.

        return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));

.

        static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);

rapi

. .
Summary
This function closes an open object handle.
.

public static extern bool CeCloseHandle(int hObject);

.

function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeCloseHandleRAPI.asp

.
Documentation
[CeCloseHandle] on MSDN
.

static extern bool CeFindClose(int hFindFile);

.

Declare Function CeFindClose Lib "rapi.dll" (hFindFile As Integer) As Boolean

.
Documentation
[CeFindClose] on MSDN
.

    CeFindClose(hResult);

. .

public static extern int CeRegCloseKey(uint hkey);

.

function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeRegCloseKeyRAPI.asp

.

    // if CeRegQueryValueEx fails then close already opened reg

.

    CeRegCloseKey(key);

.

CeRegCloseKey(key);

.
Documentation
[CeRegCloseKey] on MSDN
.

    CeRegCloseKey(key2);

.

CeRegCloseKey(key);

.

CeRegCloseKey(key);

.

CeRegCloseKey(key);

.

CeRegCloseKey(key);

.

    CeRegCloseKey(key)

user32

.
Summary
.

static extern bool CloseClipboard();

.

CloseClipboard();

.
Documentation
[CloseClipboard] on MSDN
.
Summary
.

static extern bool CloseDesktop(IntPtr hDesktop);

.

Shared Function CloseDesktop(ByVal hDesktop As IntPtr) As Boolean

.
Documentation
[CloseDesktop] on MSDN
.

static extern bool CloseHandle(IntPtr hHandle);

.

Private Shared Function CloseHandle(ByVal hHandle As IntPtr) As Boolean

.
Documentation
[CloseHandle] on MSDN
.
Summary
The CloseWindow function minimizes (but does not destroy) the specified window.
.

static extern int CloseWindow (IntPtr hWnd);

.

Declare Function CloseWindow  Lib "user32.dll" (TODO) As TODO

.
Documentation
CloseWindow @msdn on MSDN
.
Summary
.

    public static extern bool CloseWindowStation(IntPtr hWinsta);

.
  • [CloseWindowStation] on MSDN
.
Summary
.

    public static extern bool CloseWindowStation(IntPtr hWinsta);

.
  • [CloseWindowStation] on MSDN
.

    // ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm

.

    [DllImport("user32.dll", EntryPoint="CloseDesktop", CharSet =  CharSet.Unicode, SetLastError = true)]

.

    public static extern bool CloseDesktop(IntPtr handle);

.

    ' ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm

.

    <DllImport("user32.dll", EntryPoint:="CloseDesktop", CharSet:=CharSet.Unicode, SetLastError:=True)> _

.

    Public Shared Function CloseDesktop(ByVal handle As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

    protected override bool CloseNativeHandle(IntPtr handle)

.

        return WindowStationAndDesktop.CloseDesktop(handle);

.

                rk.Close();

.

                rk.Close();

.

                rk.Close();

.

    /// Close the native handle. The real call is dependent on whether it is

.

    /// <param name="handle">Handle to be closed.</param>

.

    protected abstract bool CloseNativeHandle(IntPtr handle);

.

        bool closed = CloseNativeHandle(this.handle);

.

        if (closed)

.

        return closed;

.

    protected override bool CloseNativeHandle(IntPtr handle)

.

        return WindowStationAndDesktop.CloseWindowStation(handle);

.

        internal const UInt32 SC_CLOSE    =0xF060;

.

SC_CLOSE = &HF060

.

hWnd is the pointer to the window you want to close/destroy. Create a new IntPtr object with the window's handle as a parameter to it's constructor. Make sure the pointers are in decimal, not in hex as spy++ gives them to you.

.

//Closes the form

.

btnCloseWindow_Click(object sender, EventArgs e)

.

[System.Windows.Forms.Form.Close]

.

        /// Close button

.

        DFCS_CAPTIONCLOSE = 0,

.

The buttons are drawn by vectors so to draw a "menu" close icon simply draw a DFCS_CAPTIONCLOSE button with the size of SM_CXMENUCHECK/SM_CYMENUCHECK.

.

    public static void RemoveCloseButton(Form frm)

.

CloseClipboard();

.

    Private Const SC_CLOSE As Integer = &HF060

.

    EnableMenuItem(GetSystemMenu(Me.Handle, False), SC_CLOSE, MF_GRAYED)

.
Summary
EndTask - force a window to close
.

     static extern bool CloseClipboard();

.

         CloseClipboard();

.

    private const UInt32 WM_CLOSE = 0x0010;

.

            // Try closing application by sending WM_CLOSE to all child windows in all threads.

.

            // Try to close main window.

.

            if(proc.CloseMainWindow())

.

                proc.Close();

.

        // Close the enumerated window.

.

        PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);

.

   Private Const WM_CLOSE As UInt32 = &H10

.

       ' Try closing application by sending WM_CLOSE to all child windows in all threads.

.

       ' Try to close main window.

.

       If proc.CloseMainWindow() Then

.

     proc.Close()

.

     ' Close the enumerated window.

.

     PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero)

.

Here is an alternative Managed API to FindWindow, The article also describes a way to CloseWindow of another process like notepad, not sure if there is such thing in Win32 API, but at least you can do it in .NET! Here is the article:

.

     CloseClipboard();

.

     static extern bool CloseClipboard();

.

         CloseClipboard();

.

    public static void RemoveCloseButton(Form frm)

.

        return SafeNativeMethods.CloseWindowStation(handle);

.

Quote from MSDN: "The CloseWindowStation function closes an open window station handle. Do not specify the handle returned by the GetProcessWindowStation function."

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


 
Access PInvoke.net directly from VS: