Using Win32 functions in Visual FoxPro Image Gallery
PnP Configuration Manager
CM_Connect_Machine
CM_Disconnect_Machine
CM_Get_Child_Ex
CM_Get_Sibling_Ex
CM_Locate_DevNode_Ex
CM_Request_Device_Eject_Ex
Code examples:
Disconnecting USB Mass Storage Device programmatically
CM_Request_Device_Eject_Ex
..msdn    Add comment     W32 Constants      Translate this page
Prepares a local or a remote device instance for safe removal, if the device is removable.
Code examples:
Disconnecting USB Mass Storage Device programmatically
Declaration:
CMAPI CONFIGRET WINAPI
CM_Request_Device_Eject_Ex (
    IN DEVINST  dnDevInst,
    OUT PPNP_VETO_TYPE  pVetoType,
    OUT LPTSTR  pszVetoName,
    IN ULONG  ulNameLength,
    IN ULONG  ulFlags,
    IN HMACHINE  hMachine
);
FoxPro declaration:
DECLARE INTEGER CM_Request_Device_Eject_Ex IN setupapi;
    INTEGER dnDevInst,;
    INTEGER pVetoType,;
    INTEGER pszVetoName,;
    LONG ulNameLength,;
    LONG ulFlags,;
    INTEGER hMachine
Parameters:
dnDevInst
Caller-supplied device instance handle that is bound to the machine handle supplied by hMachine.

pVetoType
(Optional.) Can be set to NULL.

pszVetoName
(Optional.) Can be set to NULL.

ulNameLength
(Optional.) Caller-supplied value representing the length of the string buffer supplied by pszVetoName. This should be set to MAX_PATH.

ulFlags
Not used.

hMachine
Caller-supplied machine handle to which the caller-supplied device instance handle is bound.
Return value:
If the operation succeeds, the function returns CR_SUCCESS (0).
Usage:
nResult = CM_Request_Device_Eject_Ex(oDevice.devinst,;
    0,0,0,0, THIS.hMachine)
My comment:
Initially I expected the function to be located in cfgmgr32.dll not in setupapi.dll.
Word Index links for the CM_Request_Device_Eject_Ex :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2009-02-03 16:00:03
Modified: 2009-02-03 16:07:06
Visited in last 7 days: 11
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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.150.10)
11 sec.Function: 'ShowCursor'
21 sec.Function: 'GdipGetImageRawFormat'
30 sec.Function: 'NetShareAdd'
39 sec.Function: 'InternetGetConnectedState'
50 sec.Function: 'AssignProcessToJobObject'
1.05 min.Function: 'LsaEnumerateLogonSessions'
1.27 min.Function: 'LocalSize'
1.5 min.Function: 'GdipGetImageEncoders'
1.73 min.Function: 'RegisterClipboardFormat'
1.97 min.Function: 'SCardListReaders'
Google
Advertise here!