Windows DDK - OBJECT_ATTRIBUTES

wfunction

Well-known member
Joined
Oct 31, 2006
Messages
46
Programming Experience
1-3
Can someone give me an example on how to use NtOpenKey (or ZwOpenKey) in VB? I don't know how to use and pass the opaque OBJECT_ATTRIBUTES structure in VB.
PLEEEEEASE!
 
Why would you want to do that? .Net Framework have the Registry class in Microsoft.Win32 namespace for this usage.
 
You would have noticed that if that's what I wanted to do, I could have used RegOpenKey. However, I don't want problems with registry keys that have null characters in them (and no, I'm not trying to mess up my computer.)
 
RegistryKey class use the RegOpenKeyEx Win32 call, not the 16bit RegOpenKey.
 
Although I understand that you're trying to help me (thank you), I would really appreciate it if you answer the question rather than erase it. And remember what I said?
"However, I don't want problems with registry keys that have null characters in them"
 
You know, and i'm not implying anything. But the reason people could use such an undocumented function is to hide malicious software.

This article touches on ntopenkey. It's written in c# i'm afraid but the article may help...

http://www.codeproject.com/csharp/lookup.asp
 
Thank you. I really appreciate it. And, you might want to know, C# is not much of a problem for me.
Just a note: this function is documented.
Also, I know about all that malicious code stuff, and I tell you (although you have absolutely no reason to believe me) that I am not doing anything malicious.

I will look into this link... but I would really appreciate it if you found an example in VB (as it is more understandable).

Again, thank you, and again, I am not making any malicious software. In fact, google "native registry editor" (no quotes) and you'll see a CodeProject link. That's what I'm also trying to do.
 
I just noticed:
There's nothing here about OBJECT_ATTRIBUTES. Do you have any info on that? (It's not even in the source)
 
Back
Top