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]

odbc32

.

            SQLFreeStmt(stmtHandle, SQL_CLOSE);

.
Summary
SQLDisconnect closes the connection associated with a specific connection handle.
.
Summary
SQLFreeStmt stops processing associated with a specific hstmt, closes any open cursors associated with the hstmt, discards pending results and, optionally, frees all resources associated with a statement handle.
.

const int  SQL_CLOSE        = 0;

.

    const int  SQL_CLOSE        = 0;

wintrust

.

        Close = 0x00000002,

wininet

.

    InternetCloseHandle(hFind) ' close the handle.

.

    [DllImport("wininet.dll", EntryPoint = "InternetCloseHandle")]

.

    public static extern long InternetCloseHandle(IntPtr hInet);

.

            InternetCloseHandle(ftpHandle);

.

            InternetCloseHandle(internetHandle);

.

    public void CloseFTP()

.

        CloseFTP();

.

static extern bool InternetCloseHandle(IntPtr hInternet);

.

    Public Declare Function InternetCloseHandle Lib "wininet.dll" ( _

.
Documentation
[InternetCloseHandle] on MSDN
.

To close the handle returned from InternetConnect, the application should call InternetCloseHandle. This function disconnects the client from the server and frees all resources associated with the connection.

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

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

.

    public static void RemoveCloseButton(Form frm)

.

              //Removes the actual Close button

.

              //Removes the seperator between the Close button and the Maximize button

.

    private static extern int CloseHandle(

.

            // Close the process handle

.

            StatusBar.CloseHandle(hProcess);

.

    'In this example, we've opened a Notepad instance, entered some text, and clicked the 'X' to close Notepad.

.

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:

.

            Me.Close()

ntdll

.
Summary
Closes a previously opened handle.
.

static extern int NtClose(IntPtr hObject);

.

  Public Shared Function NtClose(ByVal hObject As IntPtr) As Integer

.

The same functionality as CloseHandle().

.
Documentation
[NtClose] on MSDN
.

See also PROCESS_BASIC_INFORMATION, PROCESSINFOCLASS, OpenProcess, CloseHandle.

.

        //Close handle and free allocated memory

.

        CloseHandle(hProc);

.

            //Close handle and free allocated memory

.

            CloseHandle(hProc);

.

public static extern IntPtr ZwClose(IntPtr handle);

.

Declare Sub ZwClose Lib "ntdll.dll" (Handle As Intptr)

.
Documentation
[ZwClose] on MSDN
.

Dont forget to close the sectionHandle with ZwClose!

powrprof

.

static extern bool DevicePowerClose();

.

Declare Function DevicePowerClose Lib "powrprof.dll" (TODO) As TODO

.
Documentation
[DevicePowerClose] on MSDN
.

        DevicePowerClose();

advapi32

.

             NativeMethods.CloseHandle(tokenHandle);

.

      internal static extern Boolean CloseHandle(IntPtr hObject);

.

    Private Function CloseHandle(ByVal hHandle As IntPtr) As Boolean

.

            CloseHandle(hToken)

.

    static extern bool CloseEventLog(IntPtr hEventLog);

.

           CloseEventLog(logHandle);

.

        // Make sure to close open handles

.

        CloseServiceHandle(svcHandle);

.

        CloseServiceHandle(scHandle);

.

        // Make sure to close open handles

.

        CloseServiceHandle(svcHandle);

.

        CloseServiceHandle(scHandle);

.

        // Ensure any open handle is closed.

.

            NativeMethods.CloseEventLog(hEventLog);

.
Summary
Closes a read handle to the specified event log.
.

static extern bool CloseEventLog(IntPtr hEventLog);

.

Declare Function CloseEventLog Lib "advapi32.dll" (TODO) As TODO

.
Documentation
[CloseEventLog] on MSDN
.
Summary
The CloseServiceHandle function closes a handle to a service control manager or service object.
.

public static extern bool CloseServiceHandle( IntPtr hSCObject );

.

    Private Shared Function CloseServiceHandle(ByVal serviceHandle As IntPtr) As Boolean

.

    Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As IntPtr) As Boolean

.

Handles returned from CreateService must be closed using this function, rather than the standard CloseHandle

.
Documentation

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


 
Access PInvoke.net directly from VS: