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]

dhcpsapi

.

        sqlConnection1.Close();

.

/// <param name="ClientInfo">[out] Pointer to a DHCP_CLIENT_INFO structure that contains information describing the DHCP client that most closely matches the provided search parameters. If no client is found, this parameter will be null.</param>

.

    ''' <param name="ClientInfo">[out] Pointer to a DHCP_CLIENT_INFO structure that contains information describing the DHCP client that most closely matches the provided search parameters. If no client is found, this parameter will be null.

winfax

.
Summary
Closes a fax handle.
.

static extern bool FaxClose (IntPtr FaxHandle);

.

Declare Function FaxClose Lib "winfax.dll" (TODO) As TODO

.
Documentation
[FaxClose] on MSDN

quickusb

.

        Close();

.

        Close();

.
Summary
Closes the connection to the device
.

private static extern int QuickUsbClose(IntPtr handle);

.

Declare Function QuickUsbClose Lib "quickusb.dll" (TODO) As TODO

.

int result = QuickUsbClose(handle);

.
Documentation
[QuickUsbClose] on MSDN
.

            Close();

.

        Close();

.

        Close();

wintrust

.

        Close = 0x00000002,

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)

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.

msvcrt

13: fclose
.
Summary
Closes a stream.
.

public static extern Int32 fclose(IntPtr stream);

.

Public Shared Function fclose(ByVal stream As IntPtr) As Int32

.

Do not attempt to close streams not opened by fopen (includes _wfopen) or [fopen_s] (includes wfopen_s).

.
Documentation
[fclose] on MSDN
.
Summary
freopen tries to close any file already associated with the stream given as third parameter and disassociates it. Then, whether that stream was successfuly closed or not, freopen opens the file whose name is passed in the first parameter, filename, and associates it with the specified stream just as fopen would do using the mode value specified as the second parameter.

hhctrl

.

        HH_CLOSE_ALL = 0x0012

.

     HH_CLOSE_ALL = &H12

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.

irprops

.
Summary
closes an enumeration handle associated with a device query.
.

static extern bool BluetoothFindDeviceClose(IntPtr hFind);

.

    Private Shared Function BluetoothFindDeviceClose( _

.
Documentation
[BluetoothFindDeviceClose] on MSDN
.

        CloseHandle(firstRadio);

.

        CloseHandle(nextRadio);        

.

    /// Closes an open object handle.

.

    static extern bool CloseHandle(IntPtr handle);

.

    /// <param name="phRadio">Pointer to where the first enumerated radio handle will be returned. When no longer needed, this handle must be closed via CloseHandle.</param>

.

    /// When this handle is no longer needed, it must be closed via the BluetoothFindRadioClose.

.
Summary
closes the enumeration handle associated with finding Bluetooth radios.
.

private static extern bool BluetoothFindRadioClose(ref IntPtr hFind);

.

    Private Shared Function BluetoothFindRadioClose(ByVal hFind As IntPtr) As Integer

.
Documentation
[BluetoothFindRadioClose] on MSDN

winscard

.
Summary
The SCardReleaseContext function closes an established resource manager context, freeing any resources allocated under that context, including SCARDHANDLE objects and memory allocated using the SCARD_AUTOALLOCATE length designator.

crypt32

.

    CertCloseStore(store, 0);

.

The CertCloseStore function closes a certificate store handle and reduces the reference count on the store. There needs to be a corresponding call to CertCloseStore for each successful call to the CertOpenStore or CertDuplicateStore functions.

.

[DllImport("CRYPT32.DLL", EntryPoint="CertCloseStore", CharSet=CharSet.Auto, SetLastError=true)]

.

public static extern bool CertCloseStore(IntPtr storeProvider, int flags);

.
Documentation
[CertCloseStore] on MSDN
.

    CertCloseStore(

.

    CERT_CLOSE_STORE_CHECK_FLAG);

.

    CertCloseStore(

.

    CERT_CLOSE_STORE_CHECK_FLAG);

.

            WinCapi.CertCloseStore(hSysStore, 0) ;

.

    BOOL      WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags);

.

    public static extern bool CertCloseStore(

.

        WinCapi.CertCloseStore(hSysStore, 0);

.

        public static extern bool CryptMsgClose(

.
Documentation
[CryptMsgClose] on MSDN

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,

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."

.

    public static void RemoveCloseButton(Form frm)

.

    private const Int32 SC_CLOSE = 0xF060;

.

    public static void RemoveConsoleCloseButton()

.

        DeleteMenu(hMenu, SC_CLOSE, MF_GRAYED);

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

       uint close= GetMenuItemID(hmenusys , 6);

.

       ModifyMenu(hmenusys, close, 0X0, (IntPtr) min, "Close");

.

       ModifyMenu(hmenusys, max, 0X0, (IntPtr)close, "Maximize");

.

You can close this page. this is not function.

.

CloseClipboard();

.

        return SafeNativeMethods.CloseWindowStation(handle);

.

See [Enums.ACCESS_MASK] and [CloseWindowStation].

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


 
Access PInvoke.net directly from VS: