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

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.

Constants

.

        static extern bool CloseHandle(IntPtr hHandle);

.

                    CloseHandle(hToken);

.

        public const int CO_E_FAILEDTOCLOSEHANDLE = (int)(0x80010138 - 0x100000000);

kernel32

.
Summary
.

static extern bool CloseHandle(IntPtr hObject);

.

Public Shared Function CloseHandle(ByVal hObject As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal hObject As IntPtr) As Boolean

.

Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer

.

def CloseHandle(hObject as IntPtr) as bool:

.

For .NET 2.0, consider using Microsoft.Win32.SafeHandles.SafeFileHandle instead. It can be used where IntPtr is used. If you use a SafeFileHandle, do not call CloseHandle as the CLR will close it for you (even if it's already closed).

.

      static extern unsafe bool CloseHandle(

.

CloseHandle(hMapFile)

.
Documentation
[CloseHandle] on MSDN
.

CloseHandle(myEventHandle);

.

NOTE: This class needs some changes. The CloseHandle call will destroy the event when the last handle is closed. This makes it hard for one application to "lock" the event while making another wait on it since this class is always closing the handle. An alternative that I found to work is to have the CreateEvent call in the constructor and implement IDisposable by moving the CloseHandle call to the Dispose method.

.

    static extern bool CloseHandle(IntPtr hObject);

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

        CloseHandle( _Handle );

.

    private static extern bool CloseHandle(IntPtr handle);

.

        CloseHandle(_handle);

.

    private static extern bool CloseHandle([In] IntPtr hObject);

.

        CloseHandle(handleToSnapshot);

.

   Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer

.

       CloseHandle(hdrive)

.

   static extern bool CloseHandle(IntPtr hHandle);

.

            CloseHandle(ptrProcess);

.

        CloseHandle(handle);

.

        CloseHandle(handle);

.

    private static extern bool CloseHandle(

.

        if (ptr !=IntPtr.Zero && ptr.ToInt32() != INVALID_HANDLE_VALUE) CloseHandle(ptr);

.

    static extern bool CloseHandle(IntPtr hObject);

.

     static extern bool CloseHandle(IntPtr hObject);

.

     CloseHandle(hThread);

.

        ToolHelp.CloseHandle(heaplist_h);  

.

public static extern bool CloseHandle(IntPtr Object);

.

  CloseHandle (Job);

.

                CloseHandle(hHandle); //fair to leak if can't close

.

                CloseHandle(hHandle); //fair to leak if can't close

.

See also CloseHandle,

.

If you use the IntPtr version, use a try/finally block to ensure you call CloseHandle

.

        static extern bool CloseHandle(IntPtr hObject);

.

            CloseHandle(handle);

.

           CloseHandle(threadHandle);

.

           CloseHandle(threadHandle); // Don't forget close thread handle

.

  static extern bool CloseHandle(IntPtr hObject);

.

    CloseHandle(hfile);

wininet

.

    InternetCloseHandle(hFind) ' close the handle.

.

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

.

    public static extern long InternetCloseHandle(IntPtr hInet);

.

            InternetCloseHandle(ftpHandle);

.

            InternetCloseHandle(internetHandle);

.

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.

iphlpapi

.

    Public Shared Function CloseHandle(ByVal hwn As IntPtr) As Long

.

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

coredll

.

public static extern bool CloseHandle(HANDLE hObject);

.

Declare Function CloseHandle Lib "coredll.dll" (hObject As IntPtr) As Boolean

.

        public static extern bool CloseHandle(HANDLE hObject);

.

            CloseHandle(p);

.
Documentation
[CloseHandle] on MSDN
.

        public static extern bool CloseHandle(HANDLE hObject);

.

            CloseHandle(p);

.

    Public Shared Function CloseHandle(ByVal handle As IntPtr) As Boolean

.

        WaitHandles.CloseHandle(_handle)

.

            WaitHandles.CloseHandle(Me._handle)

.

        NativeMethods.CloseHandle(file);

.

        public static extern bool CloseHandle(HANDLE hObject);

.

                CloseHandle(p);

.

    CloseHandle(pi.hProcess);

.

    CloseHandle(pi.hThread);

.

Use the DuplicateHandle function to duplicate the handle. Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The event object is destroyed when its last handle has been closed.

.

        public static extern bool CloseHandle(HANDLE hObject);

.

                CloseHandle(p);

.

        public static extern bool CloseHandle(HANDLE hObject);

.

                CloseHandle(p);

.

    CloseHandle hFile

rapi

. .

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

secur32

.
DynamicLoader
kernel32/SortCloseHandle
.

                public static extern int CloseHandle(IntPtr hObject);

.

                            OSCalls.CloseHandle(m_hToken);

msi

.

static extern uint MsiCloseHandle(IntPtr hAny);

.
Documentation
[MsiCloseHandle] on MSDN
.
Summary
The MsiCloseHandle function closes an open installation handle.
.
Summary
The MsiOpenDatabase function opens a database file for data access. This function returns a handle that should be closed using MsiCloseHandle.
.
Summary
The MsiOpenPackageEx function opens a package to use with functions that access the product database. The MsiCloseHandle function must be called with the handle when the handle is no longer needed.
.
Summary
The MsiOpenProduct function opens a product for use with the functions that access the product database. The MsiCloseHandle function must be called with the handle when the handle is no longer needed.
.

The sample application below demonstrates how to use MsiRecordSetString, MsiOpenDatabase, MsiCreateRecord, MsiCloseHandle, MsiDatabaseOpenView, MsiViewExecute, MsiDatabaseCommit, and MsiViewClose in C# to modify a property value in an MSI database. To run it, simply create a new Windows Console application and replace the code that Visual Studio gives you with the code below. You may have to modify the namespace name. The sample as-is requires a valid MSI database named SETUP.msi, with a property named PROPERTY1 in the Property table, to be located in C:\. You can of course change the path to your MSI database in the calls to ChangeMSIProperty() in Main() and use any existing property you wish.

.

    static extern int MsiCloseHandle(IntPtr hAny);

.

            MsiCloseHandle(msiRecord);

.

            MsiCloseHandle(msiView);

.

            MsiCloseHandle(msiHandle);

user32

.

static extern bool CloseHandle(IntPtr hHandle);

.

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

.
Documentation
[CloseHandle] on MSDN
.

    private static extern int CloseHandle(

.

            StatusBar.CloseHandle(hProcess);

setupapi

.

Private Declare Sub CloseHandle Lib “kernel32″ _

.

CloseHandle DeviceHandle

ntdll

.

The same functionality as CloseHandle().

.

See also OpenProcess, CloseHandle.

.

        CloseHandle(hProc);

.

            CloseHandle(hProc);

icmp

.

static extern bool IcmpCloseHandle(IntPtr handle);

.

Declare Function IcmpCloseHandle Lib "icmp.dll" (IntPtr handle) As Boolean

.
Documentation
[IcmpCloseHandle] on MSDN
.

        private static extern bool IcmpCloseHandle(IntPtr handle);

.

            IcmpCloseHandle(icmpHandle);

.

WINBOOL WINAPI IcmpCloseHandle(HANDLE IcmpHandle);

.

    IcmpCloseHandle(hIcmpFile);

Structures

.

public extern static int CloseHandle(IntPtr hObject);

.

     CloseHandle(h);

.

   CloseHandle(h);

.

   CloseHandle(h);

.

   CloseHandle(h);

.

   CloseHandle(h);

.

   CloseHandle(h);

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


 
Access PInvoke.net directly from VS: