Received STATUS_OBJECT_PATH_SYNTAX_BAD for ZwOpenKey

In my WDF driver, we are using ZwOpenKey() API to open a registry key.

This API works perfectly fine in our 32 bit Windows7 same driver,

but for 64 bit driver we got STATUS_OBJECT_PATH_SYNTAX_BAD error.

Can someone please help me out in finding out the issue for 64 bit Windows 7 driver?

What is the UNICODE_STRING value you are passing to the API?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@csr.com
Sent: Sunday, November 28, 2010 8:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Received STATUS_OBJECT_PATH_SYNTAX_BAD for ZwOpenKey

In my WDF driver, we are using ZwOpenKey() API to open a registry key.

This API works perfectly fine in our 32 bit Windows7 same driver,

but for 64 bit driver we got STATUS_OBJECT_PATH_SYNTAX_BAD error.

Can someone please help me out in finding out the issue for 64 bit Windows 7 driver?


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

Thank you Doron. It was indeed the UNICODE_STRING string name which was causing the issue. The complete registry path was not being copied to the UNICODE_STRING.