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: 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.
#30794
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();
#30795
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."

C:\Temp>QuickQuery.exe
HKLM:\Software has 0 subkeys. Query result: 31

C:\Temp>QuickQuery.exe
HKLM:\Software has 12 subkeys. Query result: 0
#30800
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.
#30801
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.
#30804
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: 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.

Reply

Statistics

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