JCL Help:OpenVolume

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Opens a handle to the specified volume.


Pascal

 function OpenVolume(const Drive: Char): THandle;


Parameters

Parameters Description
const Drive: Char The drive letter corresponding to the volume to open.


Return Value

If the function succeeds it returns a handle to the specified volume. If it fails the function returns INVALID_HANDLE_VALUE.


Description

OpenVolume opens a handle for the specified volume with read/write access. Subsequent access to the volume must be performed through the returned handle. When you're done with the volume you must call CloseVolume.


See Also

CloseVolume


About

Unit

JclFileUtils


Donator

Marcel van Brakel


Platforms

Windows


Notes

You must have administrative privileges to open a volume. This action imposes a number of 'limitations' for subsequent access to the volume. For example the alignment of buffers must be on a multiple of the volume's sector size. See the Platform SDK on CreateFile for details.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page