EldoS | Feel safer!

Software components for data protection, secure storage and transfer

GetModuleStatus and CBFSNet.dll version numbers

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#17453
Posted: 09/07/2011 16:01:13
by Eric Dahlvang (Standard support level)
Joined: 09/11/2009
Posts: 29

Are the version numbers guaranteed to match between the CBFSNet.dll file and what is returned by CallbackFileSystem.GetModuleStatus(mGuid,CallbackFileSystem.CBFS_MODULE_DRIVER, ref driverInstalled, ref VersionHigh, ref VersionLow, ref status) (i.e. the cbfs3.sys file)?

Our install patching system will overwrite the CBFSNet.dll with the new one. Once the patch has finished, I need to check if the currently installed cbfs3.sys version is the same. If not, update the driver and helper dlls as well.
#17457
Posted: 09/08/2011 00:30:12
by Eugene Mayevski (EldoS Corp.)

No, these are different modules, so build number (4th number in 1.2.3.4 version code) will be different.


Sincerely yours
Eugene Mayevski
#17467
Posted: 09/08/2011 10:06:24
by Eric Dahlvang (Standard support level)
Joined: 09/11/2009
Posts: 29

How would you suggest that we determine if the driver and helper dlls need to be updated?

Our patching system will install the latest cbfs.cab alongside the CBFSNet.dll. After this process is finished, we could extract cbfs3.sys from the .cab file, and compare the version number against the currently installed cbfs3.sys version number (obtained from a call to GetModuleStatus).

Is this the best option?
#17469
Posted: 09/08/2011 10:58:44
by Volodymyr Zinin (EldoS Corp.)

CallbackFS.Install method performs everything necessary to install the driver and the helper DLLs. If the installing version is less than the installed one then the installed driver stays in the system and vise verse.
So just call the CallbackFS.Install method and it's enough.
#17564
Posted: 09/19/2011 11:48:21
by Oleg Savelos (Standard support level)
Joined: 08/25/2008
Posts: 21

Vladimir are you suggesting calling install method on each application start?
Because i am running into same situation as Eric where i have to hardcode the version of the driver into my application and then checking it against installed one. If we had a way to get the version inside the cab file we would need no hardcoding of the driver version.
#17565
Posted: 09/19/2011 12:13:18
by Eugene Mayevski (EldoS Corp.)

If I understood right, you want to know CAB file version, but as retrieving it's version is non-trivial, you would like to check CBFSNet.dll version instead.

In SFTP Net Drive we extract .sys file from CAB and check it's version to determine the version of the CAB file (this is exactly what Eric Dahlvang is talking about). If you have better suggestions, you are welcome to share them.

The problem is that even if we kept the same version number for both CAB and .NET DLL, this would not guarantee that they are always in sync. Also .NET is not the only API, and in C++ or VCL there's no version number anyway. So the correct way is to check CAB file version somehow. As CAB format doesn't have an obvious way to specify the version, the only option is to have the version inside (in some file).


Sincerely yours
Eugene Mayevski
#17566
Posted: 09/19/2011 12:25:00
by Oleg Savelos (Standard support level)
Joined: 08/25/2008
Posts: 21

Having a version file inside the cab wouldnt offer much as it would require same procedures as with driver extraction. Guess i will stick with the hardcoded version numbers for now. Thanks.
#17634
Posted: 09/23/2011 09:46:41
by ray han (Basic support level)
Joined: 05/10/2011
Posts: 24

I have similar issue as well, I was hoping that the CallbackFileSystem.Install method will not do any update to the drivers and dlls if the version that is being installed matches the one that is already installed and the "reboot" output param will be 0 (to prevent reboot). But I noticed that the reboot param seem be 1 even in that case.

So, if I understand this correctly, we just need to hardcode drivers and use GetModuleStatus for the installed driver and match it before we even decide to call Install?

Thanks
#17636
Posted: 09/24/2011 05:58:06
by Volodymyr Zinin (EldoS Corp.)

Quote
ray han wrote:
I was hoping that the CallbackFileSystem.Install method will not do any update to the drivers and dlls if the version that is being installed matches the one that is already installed

It is so, but for one of the helper DLL (which is mount notifier DLL) it's installed also in the case if the same version is already installed. We will fixed it in the next build.
#17659
Posted: 09/26/2011 21:24:13
by ray han (Basic support level)
Joined: 05/10/2011
Posts: 24

Thank you! This will be very helpful.
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

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