Ok so, im making this programm that lets me access and write in a usb device. Im having this problem that, when i try to run the WriteFile( hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped ); it doenst work and returns 5 if i do the GetLastErrror(). If consulted manny foruns in the web and pretty much they all say that i need to run it as admin, but im admin and i set the compiler to run as admin, and the project too... so what am i doing wrong? Hanny help would be much appreciated!
Asked
Active
Viewed 334 times
1 Answers
2
Admin doesn't mean you have all permissions. Check if admin has write permissions on the file. As admin, you can either add write permissions or (if that doesn't work) take ownership and then add write permissions to admin and switch ownership back to the previous owner.

Dmitry Rubanovich
- 2,471
- 19
- 27