EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Proper way to create a "virtual" registry key and "virtual" values

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 09/22/2014 16:55:34
by not sure (Standard support level)
Joined: 05/27/2014
Posts: 24

Here is the source. This results in OnPreQueryKey callback on the driver side with KeyCachedInformation as the information class requested. And when I fill it in, I get the exception above on the client.

var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
var subKey = baseKey.OpenSubKey("Software");
var skNames = subKey.GetSubKeyNames();
Posted: 09/22/2014 17:05:57
by not sure (Standard support level)
Joined: 05/27/2014
Posts: 24

Here are the results when I do PInvoke to the RegQueryInfoKey API. For the first run I fill in the KeyCachedInformation, the second run is after I stop my handler. You can see the error returned from the API is 31 or (not surprisingly) ERROR_GEN_FAILURE - "A device attached to the system is not functioning."

HKLM:\Software has 0 subkeys. Query result: 31

HKLM:\Software has 12 subkeys. Query result: 0
Posted: 09/23/2014 12:29:05
by Volodymyr Zinin (EldoS Corp.)

Sorry for the inconveniences and thanks for such detailed information. There is a bug associated with the KeyCachedInformation handling. So unfortunately with the current build it isn't possible to use virtual keys. In the next build the bug will be fixed and in the sample application the code to create a virtualization key will be added.
The new build is expected to be released in about a week and I will notify you about it here.
Posted: 09/23/2014 12:34:12
by not sure (Standard support level)
Joined: 05/27/2014
Posts: 24

Thank you! Please let me know if I can provide any additional information. I am looking forward to the next build.
Posted: 09/23/2014 14:47:32
by not sure (Standard support level)
Joined: 05/27/2014
Posts: 24

This also appears to affect KeyFullInformation in OnPreQueryKey for your information.
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.



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