RegCreateKeyExA underCTD5.1

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

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,
REG_OPTION_NON_VOLATILE,
0x000E000F, STRING_Null, TempKey, Disposition )
works under CTD3.1 properly but under CTD5.1 it return the error 87 (invalid
parameter).
Has anybody an idea, which parameter could be wrong?

Thanks a lot for help!
Christoph

Krzysztof Dorko

RegCreateKeyExA underCTD5.1

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

 Posted by:  Krzysztof Dorko 

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

Christoph Gautschi

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?
Thanks!
Christoph

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

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

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.

James

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests