EldoS | Feel safer!

Software components for data protection, secure storage and transfer

RawDisk: cannot get valid handle with CRawDisk::Open

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#3108
Posted: 06/08/2007 15:20:02
by Kevin Putnam (Basic support level)
Joined: 06/08/2007
Posts: 2

If I remove the comments below and comment out the call to CRawDisk::Open, I am able to get a valid handle. As far as I can tell the driver is installed correctly. I've also tried replacing the "\\.\PhysicalDrive0" string with "\\.\C:" with no change. I'm compiling in VS2005. Any help would be greatly appreciated.

Code
shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
accessMode = GENERIC_WRITE | GENERIC_READ;

/*file = CreateFile(_TEXT("\\\\.\\PhysicalDrive0"),
  accessMode, shareMode, NULL, OPEN_EXISTING, 0, NULL);*/

file = CRawDisk::Open(_TEXT("\\\\.\\PhysicalDrive0"), GENERIC_WRITE | GENERIC_READ, NULL);

if (file == INVALID_HANDLE_VALUE){
  cout << "error: invalid handle.\n";
} else {
  cout << "valid handle.\n";
}
#3109
Posted: 06/08/2007 15:50:38
by Volodymyr Zinin (Team)

The destination "storages" names are incorrect. Use the following ones:
"\??\C:"
"\??\PhysicalDrive0"

I.e. in the C/C++ notation:
CRawDisk::Open(_TEXT("\\??\\C:"), GENERIC_WRITE | GENERIC_READ, NULL);
#3110
Posted: 06/08/2007 16:00:22
by Kevin Putnam (Basic support level)
Joined: 06/08/2007
Posts: 2

Thanks! That did the trick.
#6781
Posted: 06/29/2008 03:24:46
by narges roshanbin (Basic support level)
Joined: 06/29/2008
Posts: 1

Hello dear friends,

I just want to start using Rawdisk and I really need to use it. Could you please help me and give me some information about it. For example, I will be really thankful if you give me a 5-line sample program or introduce a tutorial.

Thank you very much for your help.

Best regards,
Narges.
#6786
Posted: 06/30/2008 02:07:24
by Eugene Mayevski (Team)

You need to purchase a license *before* you can start using RawDisk. Evaluation version is not available for this product. Please see information on the order page.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 19089 times

Number of guests: 3, 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!