RegCreateKeyExA underCTD5.1

forum.sourcecode (2000-2005) & (2005-2010)

RegCreateKeyExA underCTD5.1

Post by Gautschi » 12 Aug 2008, 11:56

 Posted by:  Gautschi 

Hi all
The function
RegCreateKeyExA( FGetBaseKey(Relative), Key, 0, STRING_Null,
0x000E000F, STRING_Null, TempKey, Disposition )
works under CTD3.1 properly but under CTD5.1 it return the error 87 (invalid
Has anybody an idea, which parameter could be wrong?

Thanks a lot for help!

Krzysztof Dorko

Re: RegCreateKeyExA underCTD5.1

Post by Krzysztof Dorko » 12 Aug 2008, 17:02

 Posted by:  Krzysztof Dorko 

Probably function is wrong
Since all strings in 5.1 are unicode I will try to use RegCreateKeyExW
Or try to convert all strings to Ansi

Christoph Gautschi

Re: RegCreateKeyExA underCTD5.1

Post by Christoph Gautschi » 22 Aug 2008, 14:26

 Posted by:  Christoph Gautschi 

Hi Kris
Thanks for the fast answer! RegCreateKeyExW don't work.
How can I convert strings to Ansi?

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: RegCreateKeyExA underCTD5.1

Post by Jeff Luther » 22 Aug 2008, 16:58

 Posted by:  Jeff Luther 

v5.1 has SalStrToMultiByte & SalStrToWideChar for doing that.

- Jeff
Unify Corp.

James McCall

Re: RegCreateKeyExA underCTD5.1

Post by James McCall » 29 Aug 2008, 20:25

 Posted by:  James McCall 

In what way does RegCreateKeyExW not work? What's the error code? It works
fine for me (TD5.1 SP3 on Windows XP SP2).

Which operating system are you running it on? I recall having problems in
CTD2000 with RegCreateKeyExA on Windows NT.


Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests