Using Win32 functions in Visual FoxPro Image Gallery
Device Input and Output
..msdn
DeviceIoControl
Code examples:
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
DeviceIoControl
..msdn    Add comment     W32 Constants      Translate this page
Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
Code examples:
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Declaration:
 
BOOL DeviceIoControl(
  HANDLE hDevice,
  DWORD dwIoControlCode,
  LPVOID lpInBuffer,
  DWORD nInBufferSize,
  LPVOID lpOutBuffer,
  DWORD nOutBufferSize,
  LPDWORD lpBytesReturned,
  LPOVERLAPPED lpOverlapped
);
 
FoxPro declaration:
 
DECLARE INTEGER DeviceIoControl IN kernel32;
    INTEGER   hDevice,;
    INTEGER   dwIoControlCode,;
    STRING  @ lpInBuffer,;
    INTEGER   nInBufferSize,;
    STRING  @ lpOutBuffer,;
    INTEGER   nOutBufferSize,;
    INTEGER @ lpBytesReturned,;
    INTEGER   lpOverlapped
 
 
Parameters:
hDevice
[in] Handle to the device on which the operation is to be performed.

dwIoControlCode
[in] Control code for the operation.

lpInBuffer
[in] Pointer to the input buffer that contains the data required to perform the operation.

nInBufferSize
[in] Size of the input buffer, in bytes.

lpOutBuffer
[out] Pointer to the output buffer that is to receive the data returned by the operation.

nOutBufferSize
[in] Size of the output buffer, in bytes.

lpBytesReturned
[out] Pointer to a variable that receives the size of the data stored in the output buffer, in bytes.

lpOverlapped
[in] Pointer to an OVERLAPPED structure.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
To retrieve a handle to the device, you must call the CreateFile function with either the name of a device or the name of the driver associated with a device.

To specify a device name, use the following format: \\.\DeviceName

Other valid device names:
\\.\a:
\\.\PhysicalDrive0
\\.\PhysicalDrive1
\\.\vwin32
Word Index links for the DeviceIoControl :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-09-09 18:31:40
Modified: 2004-09-09 18:37:15
Visited in last 7 days: 15
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.234.126.92)
3 sec.Example: 'Transparent Menu Class (requires VFP9)'
6 sec.Example: 'Setting the Window Region for a form'
4.19 hrs.Example: 'Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)'
 Function: 'GdipGetPageScale'
Function group: 'GDI+ Graphics'
6.28 hrs.Example: 'Testing if a connection to an Url can be established'
 Example: 'Testing Clipboard functions: emptying the clipboard'
 Function: 'EndPath'
9.91 hrs.Function: 'EndTask'
Function group: 'Window'
10.37 hrs.Example: 'Obtaining names of local and global groups for current user (WinNT/XP/2K)'
 Function: 'CreateProcessAsUser'
Google
Advertise here!