EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Sample code???

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#29673
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;
}
#29674
Posted: 06/03/2014 12:08:31
by Eugene Mayevski (EldoS Corp.)

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
#29675
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???

Thanks.
#29676
Posted: 06/03/2014 12:31:31
by Eugene Mayevski (EldoS Corp.)

The first parameter is declared as LPCWSTR which is Unicode. You need to pass
Code
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
#29677
Posted: 06/03/2014 12:32:52
by Eugene Mayevski (EldoS Corp.)

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
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 3565 times

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




|

Back to top

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

Got it!