Non-standard registry types???

Hello,

We are creating a kernel mode, non-PnP service for our application. One function recursively scans from a starting key in the registry, collects information about keys and values, and emits XML records for each key and its values. During testing, we encountered the following, which was totally unexpected because it has a non-standard registry type. In fact, all of the keys under HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Builtin\Aliases\Names have non-standard Default registry types. I’ve Googled and searched Microsoft for information about non-standard registry types, but have found nothing.

HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Builtin\Aliases\Names\Users
(Default) 0x221 (zero-length binary value)

Why haven’t I found any information about non-standard registry types?
Are they only used by Microsoft?
When processing these values, should they simply be encoded as binary values and emitted as XML by our code? Later, our code would display this information to the user.

Our application is not a registry backup utility, but we do want to collect registry key and value information for display to our users, so I need to figure out what to do with non-standard registry types, and would really appreciate your information!

Thank you,

Mike

Only 12 registry types or so have been enumerated and documented. Any other
value is non standard and the internal format might make sense only to the
component that puts the data in there. The registry functions accept any 32
bit value as the value type so in theory anyone might make use of non
standard values. Since you don’t own the data and you don’t know the format,
it is up to you whether to represent this data as binary or otherwise.

While the purpose of the excercise is not clear, you should realize there is
no way you could safely restore the data that you have saved this way for a
list of reasons.

Alsoa recursive function like this can easily run out of stack space. Avoid
local variables in this routine wherever possible. I would add a call to
IoGetRemainingStackSize at the top of your function and bail out if it
returns less than an acceptable minimum.

//Daniel

wrote in message news:xxxxx@ntdev…
> Hello,
>
> We are creating a kernel mode, non-PnP service for our application. One
> function recursively scans from a starting key in the registry, collects
> information about keys and values, and emits XML records for each key and
> its values. During testing, we encountered the following, which was
> totally unexpected because it has a non-standard registry type. In fact,
> all of the keys under
> HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Builtin\Aliases\Names have non-standard
> Default registry types. I’ve Googled and searched Microsoft for
> information about non-standard registry types, but have found nothing.
>
> HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Builtin\Aliases\Names\Users
> (Default) 0x221 (zero-length binary value)
>
> Why haven’t I found any information about non-standard registry types?
> Are they only used by Microsoft?
> When processing these values, should they simply be encoded as binary
> values and emitted as XML by our code? Later, our code would display this
> information to the user.
>
> Our application is not a registry backup utility, but we do want to
> collect registry key and value information for display to our users, so I
> need to figure out what to do with non-standard registry types, and would
> really appreciate your information!
>
> Thank you,
>
> Mike
>
>

Hi Daniel,

Ahhhh! I see! Thank you for the suggestion about using IoGetRemainingStackSize()! I will look it over for our application. Thank you again for your help!

Mike

Remember that whatever you can do with recursion, you can also implement with a loop and a heap based stack

d

debt from my phone

-----Original Message-----
From: xxxxx@a-bit-of-help.com
Sent: Sunday, July 10, 2011 1:17 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Non-standard registry types???

Hi Daniel,

Ahhhh! I see! Thank you for the suggestion about using IoGetRemainingStackSize()! I will look it over for our application. Thank you again for your help!

Mike


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks for the message, Doron! In fact, I created a library that implements a stack ADT of dynamic unicode strings using the WdfCollection. It works great and our recursion uses looping rather than the call-stack. :slight_smile: