Hello everybody,
I have a problem for R/W in the registry.
I have 2 drivers, one for the busDriver and another fot the child.
For install correctely the child driver, before I install the bus.
This busDriver write in the registry his name for the child.
After install the bus, teh child use the BusName for execute the “IoGetDeviceObjectPointer” function.
My problem, I don’t know why I didn’t arrive to Read and Write in the registry.
Bus ==> Write his name in the registry.
Child ==> Read the busName.
SomeOne have an Idea ??
Thanks a lot for your help.
Best Regards,
Kamel
For information, it’s my function that enable to write in the registry :
=============================================
InitializeObjectAttributes(
&objectAttributes,
&name ,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
status = ZwCreateKey(&newKeyHandle ,
KEY_ALL_ACCESS,
&objectAttributes,
0,
NULL,
REG_OPTION_VOLATILE,
&Disposition );
status = ZwSetValueKey(
valueKeyHandle,
&nameKey,
0,
REG_EXPAND_SZ,
dataValue.Buffer,
dataValue.Length
);
All is ok with XP but not with VISTA
What is the string value of ‘name’ in your example below?
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: xxxxx@hotmail.com
Sent: Monday, October 27, 2008 7:49 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Writing in registry in VISTA
For information, it’s my function that enable to write in the registry :
=============================================
InitializeObjectAttributes(
&objectAttributes,
&name ,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
status = ZwCreateKey(&newKeyHandle ,
KEY_ALL_ACCESS,
&objectAttributes,
0,
NULL,
REG_OPTION_VOLATILE,
&Disposition );
status = ZwSetValueKey(
valueKeyHandle,
&nameKey,
0,
REG_EXPAND_SZ,
dataValue.Buffer,
dataValue.Length
);
=============================================
All is ok with XP but not with VISTA
—
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
the string value “name” is the registry path:
L"\REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Services\busDriver\Devices\Device000";
I would like to create teh registry “Device000”, in this registry create a parameter “busName” with his value.
xxxxx@hotmail.com wrote:
the string value “name” is the registry path:
L"\REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Services\busDriver\Devices\Device000";
I would like to create teh registry “Device000”, in this registry create a parameter “busName” with his value.
The correct terminology here is that you want to create a “key” called
Device000, then in that key create a value called “busName”. The kernel
won’t create the key automatically. You will have to call ZwCreateKey,
THEN you can call ZwSetValueKey.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Yes you’re right TIM the problem is, before create the subkey “Device000”, it’s necessary to create the key “Devices”.
Thanks for your help TIM Roberts and Doron Holon.