Hey Guys,
Trying to play with the Win32 API but am getting the following error:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt." {System.AccessViolationException}
This occurs during a call to CreateFile():
VB Code:
sFullDrivePath = "\\.\" & sDriveLetter & ":" hDevice = CreateFile(sFullDrivePath, GENERIC_READ, FILE_SHARE_READ Or FILE_SHARE_WRITE, vbNull, OPEN_EXISTING, 0, 0)
I am attempting to open a USB disk but when I call CreateFile() to get my handle it fails...
I am on a machine that is part of a domain, I am a local admin but not domain admin. Therefore I should have enough rights to perform this operation? You only need full admin to open a hard disk.
Any ideas?
Thanks,
Matt.




Reply With Quote