i´m still struggle with this CODE
- Code: Select all Expand view
- BOOL PreventRemovalOfVolume(HANDLE hVolume, BOOL fPreventRemoval)
{
DWORD dwBytesReturned;
PREVENT_MEDIA_REMOVAL PMRBuffer;
PMRBuffer.PreventMediaRemoval = (BOOL) fPreventRemoval;
return DeviceIoControl( hVolume, IOCTL_STORAGE_MEDIA_REMOVAL,
&PMRBuffer, sizeof(PREVENT_MEDIA_REMOVAL),
NULL, 0, &dwBytesReturned, NULL );
}
HB_FUNC.PRG(148): warning C4244: "=": Konvertierung von "BOOL" in "BOOLEAN", möglicher Datenverlust
HB_FUNC.PRG(156): warning C4431: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C nicht mehr unterstützt.
now i "think" to use a HB_FUNC() instead
- Code: Select all Expand view
- HB_FUNC( PROV ) //PreventRemovalOfVolume
{
HANDLE hVolume = ( HWND ) hb_parnl( 1 ) ;
BOOL fPreventRemoval = ( BOOL) hb_parl(2) ;
...
hb_retl( DeviceIoControl( ..) ) ;
}
is something like that possible
---
if Yes :
what Type is "HANDLE hVolume" -> HWND
does it need to check for 64 Bit