EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem with Open and CreateFile

#15113
Posted: 11/24/2010 03:17:00
by Mehdi  (Basic support level)
Joined: 11/24/2010
Posts: 7

Hi
I have gotten a Evaluation version of RawDisk (with a evaluation key)
I'm using it in C++ (VC++ 2008) on Windows 7 32 bit to open a physical disk, but it returns 0xFFFFFFFF (or -1 or INVALID_HANDLE_VALUE)
What do you think s the problem ?
(I've used these strings as the first parameter, none of which work:
\\??\\C:
\\\\.\\C:
#15115
Posted: 11/24/2010 04:20:44
by Volodymyr Zinin (Team)

Hello,

Please specify a code snippet with the API call you use to open the disk. Of course remove the evaluation key because it's a public forum. Also check the last error (by the use of GetLastError) right after the problem call.
Thanks.
#15117
Posted: 11/24/2010 05:50:03
by Mehdi  (Basic support level)
Joined: 11/24/2010
Posts: 7

Code
HANDLE handle = CRawDisk::CreateFile(L"\\??\\C:",
      GENERIC_READ | GENERIC_WRITE,
      OPEN_EXISTING,
      0,L"...");
      

GetLastError: 3
handle: 0xFFFFFFFF

Thank you
#15118
Posted: 11/24/2010 06:48:22
by Volodymyr Zinin (Team)

Use the RawDisk.Open(Ex) methods instead.
#15119
Posted: 11/24/2010 06:53:40
by Mehdi  (Basic support level)
Joined: 11/24/2010
Posts: 7

I think my problem is that I haven't installed the driver using InstallDriver method.
I thought the library would load the driver during call to Open or CreateFile
#15129
Posted: 11/25/2010 09:35:21
by Eugene Mayevski (Team)

Installation of drivers is expected to be performed separately during installation of the application because it requires administrative rights.


Sincerely yours
Eugene Mayevski
#15141
Posted: 11/27/2010 03:50:04
by Mehdi  (Basic support level)
Joined: 11/24/2010
Posts: 7

I installed the driver using InstallDriver method, but it always returns FALSE;
GetLastError: 2
I use it like this:
Code
BOOL result = CRawDisk::InstallDriver(L"C:\\Program Files\\EldoS\RawDisk\\Drivers\\release\\32bit\\elrawdsk.sys","SomeName",&reboot);
   if(result != TRUE)
   {
      printf("Driver installation not successful. GetLastError: %d\n",GetLastError());
      return 1;
   }
#15142
Posted: 11/27/2010 05:22:25
by Eugene Mayevski (Team)

Do you install the driver within the account that has administrative rights (i.e. belongs to Administrators groups or has explicit permissions to install drivers)?


Sincerely yours
Eugene Mayevski
#15143
Posted: 11/27/2010 05:56:53
by Mehdi  (Basic support level)
Joined: 11/24/2010
Posts: 7

Yes (my user is Administrator)
#15144
Posted: 11/27/2010 11:52:16
by Volodymyr Zinin (Team)

Error 2 means "file not found". Please check if the file "C:\\Program Files\\EldoS\RawDisk\\Drivers\\release\\32bit\\elrawdsk.sys" exists.

BTW in the path you specified there is not a double slash between "Eldos" and "RawDisk". Perhaps it's the reason of the problem.

Reply

Statistics

Topic viewed 26602 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!