error C2065: 'HKEY' : undeclared identifier

Hi All,

I am writing a C code to read a registry key. I am getting error “error C2065: ‘HKEY’ : undeclared identifier”.

Any suggestions?

Thanks,
Harsha


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping

Hi All,

I am writing a C code to read a registry key. I am getting error “error C2065: ‘HKEY’ : undeclared identifier”.

This is a forum about writing and developing device drivers , not for “general” questions. What about doing a “Google” for a code
snippet from which you can "copy and paste " ?

Christiaan

Any suggestions?

Thanks,
Harsha


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@compaqnet.be To
unsubscribe send a blank email to xxxxx@lists.osr.com

If this is a driver, HKEY does not exist. You just use a HANDLE.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Hi All,
?
I am writing a C code to read a registry key. I am getting error “error C2065: ‘HKEY’ : undeclared identifier”.
?
Any suggestions?
?
Thanks,
Harsha


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

User-mode or kernel-mode?

If kernel mode, use HANDLE, not HKEY.

– arlie


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 3:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Hi All,

I am writing a C code to read a registry key. I am getting error “error
C2065: ‘HKEY’ : undeclared identifier”.

Any suggestions?

Thanks,
Harsha


Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
http:_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1>
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: xxxxx@stonestreetone.com To unsubscribe send a blank email to
xxxxx@lists.osr.com</http:>

Thank you. I defined the key as HANDLE. But then it is giving error: not initialized. What is general initializing value for type HANDLE?

Doron Holan wrote: If this is a driver, HKEY does not exist. You just use a HANDLE.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Hi All,

I am writing a C code to read a registry key. I am getting error “error C2065: ‘HKEY’ : undeclared identifier”.

Any suggestions?

Thanks,
Harsha

Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping

Please post a snippet of your code. You’re probably misunderstanding how to
use the registry functions. Posting a snippet will allow us to see exactly
what you are doing, rather than guessing over multiple iterations of email.

– arlie


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 5:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Thank you. I defined the key as HANDLE. But then it is giving error: not
initialized. What is general initializing value for type HANDLE?

Doron Holan wrote:

If this is a driver, HKEY does not exist. You just use a HANDLE.

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Hi All,

I am writing a C code to read a registry key. I am getting error
“error C2065: ‘HKEY’ : undeclared identifier”.

Any suggestions?

Thanks,
Harsha
________________________________________
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping — Questions?
First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: xxxxx@microsoft.com To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com

________________________________

Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
http:_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1>
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: xxxxx@stonestreetone.com To unsubscribe send a blank email to
xxxxx@lists.osr.com</http:>

NULL, but the real question I have is why you are asking a C programming
101 questions in an environment where you should know such things, or at
least HOW to find out the type definition of HANDLE. You know . put the
cursor on HANDLE, do a right click and select definition?

The personal opinion of
Gary G. Little


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.com
Sent: Thursday, December 29, 2005 4:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Thank you. I defined the key as HANDLE. But then it is giving error: not
initialized. What is general initializing value for type HANDLE?

Doron Holan wrote:

If this is a driver, HKEY does not exist. You just use a HANDLE.

d


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, December 29, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error C2065: ‘HKEY’ : undeclared identifier

Hi All,

I am writing a C code to read a registry key. I am getting error “error
C2065: ‘HKEY’ : undeclared identifier”.

Any suggestions?

Thanks,
Harsha

Y! ahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping — Questions? First
check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

_____

Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo!
http:;_ylc=X3oDMTE2bzVzaHJtBF9TAzk1OTQ5NjM2BHNlYwNtYWlsdGFnBHNsawNob2xpZGF5LTA1
%20%0d%0a> Shopping — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed
to ntdev as: xxxxx@seagate.com To unsubscribe send a blank email
to xxxxx@lists.osr.com</http:>