Reading registry using NdisReadConfiguration

Hi Folks,

Can’t “NdisReadConfiguration” read a 64 bit value?

In NDIS_CONFIGURATION_PARAMETER, I can see only two fields in the union.
One is for integer and another for NDIS_STRING.

Can any one put light on how to read get values more than 32bit?

Regards
Deepak

You can always store the value in the registry (configuration) as a string
and convert it to a 64-bit integer quantity with a conversion routine. NDIS
Configuration facilities (at one time) mapped across multiple OS
architectures and versions. The ?common denominator? configuration
persistence format was the character string 32-bit integer. It was never
intended to be a general purpose wrapper layer on top of the (much richer)
Windows registry mechanism. The REQ_QWORD did not show up until Win2K,
long after NDIS 3x/4x (where the configuration routines were defined).

Alternatively, you can just use the ZwXxx() or RtlXxxx() routines to access
the registry directly but some have noted that this might be a barrier to
WHQL acceptance.

Good Luck,

Dave Cattley

Consulting Engineer

Systems Software Development

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Deepak Gupta
Sent: Monday, December 29, 2008 7:11 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Reading registry using NdisReadConfiguration

Hi Folks,

Can’t “NdisReadConfiguration” read a 64 bit value?

In NDIS_CONFIGURATION_PARAMETER, I can see only two fields in the union.
One is for integer and another for NDIS_STRING.

Can any one put light on how to read get values more than 32bit?

Regards
Deepak
— 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

Regards
Deepak

On Mon, Dec 29, 2008 at 7:35 PM, David R. Cattley wrote:

> You can always store the value in the registry (configuration) as a
> string and convert it to a 64-bit integer quantity with a conversion
> routine. NDIS Configuration facilities (at one time) mapped across multiple
> OS architectures and versions. The ‘common denominator’ configuration
> persistence format was the character string 32-bit integer. It was never
> intended to be a general purpose wrapper layer on top of the (much richer)
> Windows registry mechanism. The REQ_QWORD did not show up until Win2K,
> long after NDIS 3x/4x (where the configuration routines were defined).
>
Thanks David.
That’s why I asked a followup question do we have conversion routine
available as a kernel api.

>
>
> Alternatively, you can just use the ZwXxx() or RtlXxxx() routines to access
> the registry directly but some have noted that this might be a barrier to
> WHQL acceptance.
>
>
>
> Good Luck,
>
> Dave Cattley
>
> Consulting Engineer
>
> Systems Software Development
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Deepak Gupta
> Sent: Monday, December 29, 2008 7:11 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Reading registry using NdisReadConfiguration
>
>
>
> Hi Folks,
>
> Can’t “NdisReadConfiguration” read a 64 bit value?
>
> In NDIS_CONFIGURATION_PARAMETER, I can see only two fields in the union.
> One is for integer and another for NDIS_STRING.
>
> Can any one put light on how to read get values more than 32bit?
>
> Regards
> Deepak
> — 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
>
> —
> 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
>

Deepak Gupta wrote:

Hi Folks,

Can’t “NdisReadConfiguration” read a 64 bit value?

In NDIS_CONFIGURATION_PARAMETER, I can see only two fields in the union.
One is for integer and another for NDIS_STRING.

Can any one put light on how to read get values more than 32bit?

Regards
Deepak

NdisParameterBinary can be used to store binary blobs of any size.

–PA

RegardsDeepak

On Mon, Dec 29, 2008 at 11:56 PM, Pavel A. wrote:

> Deepak Gupta wrote:
>
>> Hi Folks,
>>
>> Can’t “NdisReadConfiguration” read a 64 bit value?
>>
>> In NDIS_CONFIGURATION_PARAMETER, I can see only two fields in the union.
>> One is for integer and another for NDIS_STRING.
>>
>> Can any one put light on how to read get values more than 32bit?
>>
>> Regards
>> Deepak
>>
>
> NdisParameterBinary can be used to store binary blobs of any size.

Which member of union “ParameterData” in NDIS_CONFIGURATION_PARAMETER
contains that binary byte array?

>
> --PA
>
>
> —
>
> 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
>

Deepak Gupta wrote:

Which member of union “ParameterData” in NDIS_CONFIGURATION_PARAMETER
contains that binary byte array?

The StringData member will describe the binary array (address, size)
rather than characters.

– PA

On Tue, Dec 30, 2008 at 3:48 PM, Pavel A. wrote:

> Deepak Gupta wrote:
>
>>
>>
>> Which member of union “ParameterData” in NDIS_CONFIGURATION_PARAMETER
>> contains that binary byte array?
>>
>
> The StringData member will describe the binary array (address, size) rather
> than characters.

Thanks a lot!!!
I will give it a try.

>
>
> – PA
>
>
> —
> 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
>

On Tue, Dec 30, 2008 at 3:52 PM, Deepak Gupta wrote:

>
>
> On Tue, Dec 30, 2008 at 3:48 PM, Pavel A. wrote:
>
>> Deepak Gupta wrote:
>>
>>>
>>>
>>> Which member of union “ParameterData” in NDIS_CONFIGURATION_PARAMETER
>>> contains that binary byte array?
>>>
>>
>> The StringData member will describe the binary array (address, size)
>> rather than characters.
>
>
> Thanks a lot!!!
> I will give it a try.
>

Thanks.
Binary data type did work with StringData.
Also, in new headers, they have provided one more union member by the name
“BinaryData”

>
>>
>> – PA
>>
>>
>> —
>> 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
>>
>
>

Deepak Gupta wrote:

Binary data type did work with StringData.
Also, in new headers, they have provided one more union member by the
name “BinaryData”

Ah. Great to know. Actually, tn that BINARY_DATA struct:

typedef struct
{
USHORT Length;
PVOID Buffer;
} BINARY_DATA;

another USHORT gets added before Buffer, due to alignment,
so it becomes same as UNICODE_STRING.

–PA