Direct access to disks and protected files from user-mode applications in Windows

RawDisk.CloseHandle method


Pascal    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

RawDisk     See also    


Closes the handle, returned by other RawDisk methods.


Not available. Use Windows.CloseHandle() function instead.

[C++ (DLL/Lib)]
Not available. Use CloseHandle() function from Windows SDK instead.

[C++ (VCL)]
Not available. Use Windows::CloseHandle() function instead.

[C++ (.NET)]
    static void CloseHandle( IntPtr DiskHandle);

    static void CloseHandle( IntPtr DiskHandle);

    Shared Sub CloseHandle( ByVal DiskHandle As IntPtr)


  • DiskHandle - the handle of the opened disk device


Use this method to close the handle obtained during successful prior call to one of CreateFile(), Open(), OpenEx() or OpenPhysicalMemoryForReading() methods.

This method is a shortcut to CloseHandle function in Windows API, and as such it's offered only for .NET (to save you from declaring and calling a P/Invoke function).

See also

CreateFile     Open     OpenEx    

Back to top