to "safe eject" USB-Drive i need DeviceIoControl
https://docs.microsoft.com/en-us/window ... eiocontrol
when call "direct" it say unkown so i try HB_FUNC
Ok, my Syntax is wrong but if i understand right 'DeviceIoControl' is already define ... so what do i missHarbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
C:\hmg.3.4.4\0\USBEJECT\HB_FUNC.PRG: In function 'HB_FUN_DeviceIoControl':
C:\hmg.3.4.4\0\USBEJECT\HB_FUNC.PRG:481:6: error: conflicting types for 'DeviceIoControl'
BOOL DeviceIoControl(
^
In file included from C:/hmg.3.4.4/mingw/i686-w64-mingw32/include/winbase.h:21:0,
from C:/hmg.3.4.4/mingw/i686-w64-mingw32/include/windows.h:70,
from C:\hmg.3.4.4\0\USBEJECT\HB_FUNC.PRG:4:
C:/hmg.3.4.4/mingw/i686-w64-mingw32/include/ioapiset.h:22:29: note: previous declaration of 'DeviceIoControl' was here
WINBASEAPI WINBOOL WINAPI DeviceIoControl (HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
^
hbmk2[HBEJECT]: Error: Running C/C++ compiler. 1
gcc.exe -c -O3 -march=i586 -mtune=pentiumpro -fomit-frame-pointer -W -Wall -pipe -IC:/hmg.3.4.4/harbour/include -IC:/hmg.3.4.4/0/USBEJECT -IC:/hmg.3.4.4/include R:/Temp/hbmk_5bvogs.dir/HBEJECT.c R:/Temp/hbmk_5bvogs.dir/HB_FUNC.c R:/Temp/hbmk_sf02sk.c
i have try to include LIBs
Code: Select all
libpaths=c:\harbour\comp\mingw\lib
libs=kernel32
libs=ntoskrnl
libs=win32k
libs=ntdll
any Idea
hole Articel is here
https://docs.microsoft.com/en-us/window ... e-a-device