Using Win32 functions in Visual FoxPro Image Gallery
Raw Input
GetRawInputData
GetRawInputDeviceInfo
GetRawInputDeviceList
RegisterRawInputDevices
Code examples:
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
GetRawInputDeviceInfo
..msdn    Add comment     W32 Constants      Translate this page
Retrieves information about the raw input device.
Code examples:
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Declaration:
UINT WINAPI GetRawInputDeviceInfo(
  __in_opt     HANDLE hDevice,
  __in         UINT uiCommand,
  __inout_opt  LPVOID pData,
  __inout      PUINT pcbSize
);
FoxPro declaration:
DECLARE INTEGER GetRawInputDeviceInfo IN user32;
    INTEGER hDevice,;
    LONG uiCommand,;
    STRING @pData,;
    LONG @pcbSize

Parameters:
hDevice [in, optional]
A handle to the raw input device.

uiCommand [in]
Specifies what data will be returned in pData.

pData [in, out, optional]
A pointer to a buffer that contains the information specified by uiCommand.

pcbSize [in, out]
Type: PUINT

The size, in bytes, of the data in pData.
Return value:
If successful, this function returns a non-negative number indicating the number of bytes copied to pData.
Usage:
* retrieving device name
nBufsize=0

= GetRawInputDeviceInfo( m.nDevicehandle,;
    RIDI_DEVICENAME, NULL, @nBufsize )

cBuffer = REPLICATE(CHR(0), m.nBufsize)
= GetRawInputDeviceInfo( m.nDevicehandle,;
    RIDI_DEVICENAME, @cBuffer, @nBufsize )

cBuffer = ALLTRIM(STRTRAN(m.cBuffer, CHR(0), ""))
My comment:
If uiCommand is RIDI_DEVICEINFO, set the cbSize member of RID_DEVICE_INFO to sizeof(RID_DEVICE_INFO) before calling GetRawInputDeviceInfo.

See also: GetRawInputDeviceList
Word Index links for the GetRawInputDeviceInfo :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2011-01-04 20:06:11
Modified: 2011-01-04 20:12:59
Visited in last 7 days: 74
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.163.210.170)
9 sec.Function: 'CeDeleteFile'
18 sec.Function: 'ReleaseDC'
27 sec.Function: 'SetNamedPipeHandleState'
40 sec.Example: 'How to create MD-5 and SHA-1 hash values from a string'
53 sec.Function: 'NetUserGetLocalGroups'
1.08 min.Function: 'GetDefaultPrinter'
1.32 min.Function: 'GetWindowThreadProcessId'
1.52 min.Function: 'ExtractAssociatedIcon'
1.7 min.Function: 'CeRemoveDirectory'
1.93 min.Function: 'WinHttpCloseHandle'
Google
Advertise here!