Using Win32 functions in Visual FoxPro Image Gallery
Raw Input
Code examples:
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
..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)
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

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]

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.
* retrieving device name

= 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 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: 90
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
24 sec.Function: 'CeDeleteFile'
46 sec.Function: 'GetThreadPriority'
1.15 min.Function: 'ReleaseDC'
1.48 min.Function: 'GetPerformanceInfo'
1.83 min.Function: 'Process32Next'
2.15 min.Function: 'GetThreadPriority'
2.52 min.Function: 'GdipResetWorldTransform'
2.9 min.Function: 'CreateTransaction'
3.27 min.Function: 'mmioOpen'
3.58 min.Function: 'SetThreadPriority'
Advertise here!