EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Sample code???

Posted: 06/03/2014 12:05:56
by Kevin Nguyen (Basic support level)
Joined: 06/03/2014
Posts: 2

I installed the RawDisk 3.1.32.
There are no example code.
I tried a simple program it crashed upon calling CRawDisk::InstallDriver function.

#include "stdafx.h"
#include "rawdisk.h"

char *license_key = "........";

int _tmain(int argc, _TCHAR* argv[])
bool RebootNeeded = false;

==> This crashed with error Unhandled exception at at 0x76ECC41F in Test.exe: Microsoft C++ exception: ERDError at memory location 0x0036F37C.

CRawDisk::InstallDriver(L"C:\DevTools\RawDisk\Drivers\debug\32bit\\rawdsk3.sys", "RawDisk", (LPBOOL)&RebootNeeded);

return 0;
Posted: 06/03/2014 12:08:31
by Eugene Mayevski (Team)

Check the correctness of the path. As I can see it with single backslashes, it wouldn't be valid. You need to use double-backslashes.

Sincerely yours
Eugene Mayevski
Posted: 06/03/2014 12:14:18
by Kevin Nguyen (Basic support level)
Joined: 06/03/2014
Posts: 2

I correct the \\ and it still has the sample failure.
I used VS2012 with static runtime library

=> CRawDisk::InstallDriver(L"C:\\DevTools\\RawDisk\\Drivers\\debug\\32bit\\rawdsk3.sys", "RawDisk", (LPBOOL)&RebootNeeded);

Do you have any sample code???

Posted: 06/03/2014 12:31:31
by Eugene Mayevski (Team)

The first parameter is declared as LPCWSTR which is Unicode. You need to pass
CRawDisk::InstallDriver(TEXT("C:\\DevTools\\RawDisk\\Drivers\\debug\\32bit\\rawdsk3.sys"), "RawDisk", (LPBOOL)&RebootNeeded);

No, there's no sample code available due to simplicity of the product and impossibility to create any sample (would you like a sample which will wipe your disk?).

Sincerely yours
Eugene Mayevski
Posted: 06/03/2014 12:32:52
by Eugene Mayevski (Team)

Also ERDError exception class has Message() method which you can call to obtain the error message associated with the exception. Please inspect the error message.

There's ErrorCode() function as well there, which returns the error code.

Sincerely yours
Eugene Mayevski



Topic viewed 7881 times

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