EldoS | Feel safer!

Software components for data protection, secure storage and transfer

DLLs make life easy

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.
#35929
Posted: 02/17/2016 11:32:39
by Eugene Mayevski (EldoS Corp.)

CRawDisk methods throw an exception of ERDError type. ERDError is a class which has "LPCTSTR Message();" and "DWORD ErrorCode()" methods. So you can catch the error of this class and inspect what's contained in it. So your code would be

Code
try
{
    InstallDriver(...);
}
catch (ERDError ex)
{
    cout << ex->Message();
}


or something like that.


Sincerely yours
Eugene Mayevski
#35932
Posted: 02/17/2016 12:29:07
by Stephen Pelc (Basic support level)
Joined: 02/10/2016
Posts: 7

Sorry - my bad!

InstallDriver works when you specify the right driver file. Once I put the 32 bit and 64 bit drivers (renamed to rawdsk3-x86.sys and rawdsk3-x64.sys) in the working directory all goes well after much whining from Kaspersky.

Again, sorry to have wasted your time.

Having passed pointers for FileVersionHigh, FileVersionLow, and ServiceStatus to GetDriverStatus(), how do I persuade GetDriverStatus() to fill them in? The code in the DLL is below.
Code
extern "C" void __declspec(dllexport) RawDisk_GetDriverStatus(
   LPCSTR ProductName,
   LPBOOL ServiceInstalled,
   LPDWORD FileVersionHigh,
   LPDWORD FileVersionLow,
   LPSERVICE_STATUS ServiceStatus
){
   CRawDisk::GetDriverStatus(
      ProductName, ServiceInstalled, FileVersionHigh, FileVersionLow, ServiceStatus
   );
}


Regards, Stephen
#35933
Posted: 02/17/2016 12:45:21
by Eugene Mayevski (EldoS Corp.)

1) Pass the same ProductNAme that you used to install the driver
2) check ServiceInstalled after the call. Obviously, if the driver is not installed, then file versions can not be obtained.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 5992 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!