ADVAPI32.DLL -> RegQueryValueExA

forum.gupta.bugreport (2005-2010)
Philip Hautekiet

ADVAPI32.DLL -> RegQueryValueExA

Post by Philip Hautekiet » 12 Feb 2008, 13:14

 Posted by:  Philip Hautekiet 

In Centura 1.5 we're using some functions to read some values from the
registry.
It doesn't work anymore in Centura 5.1 ...

Last week we noticed "LPSTR vs LPWSTR" in external function declarations of
the visual toolchest functions.
This made us think in the same direction for this problem.

Where can we find the External function declaration, or the right
parameters, for the functions to make it work in Centura 5.1?

Thanks in advance.

Philip Hautekiet

Re: ADVAPI32.DLL -> RegQueryValueExA

Post by Philip Hautekiet » 12 Feb 2008, 13:56

 Posted by:  Philip Hautekiet 

I forgot to attach a part of the old-style registr.apl

Is the declaration of the external functions correct ?

You do not have the required permissions to view the files attached to this post.

Krzysztof Dorko

Re: ADVAPI32.DLL -> RegQueryValueExA

Post by Krzysztof Dorko » 12 Feb 2008, 15:51

 Posted by:  Krzysztof Dorko 

Hi
Example: RegQueryValueExA - is an ansii version (A on the end) so you should
change it to RegQueryValueEx and LPSTR to LPWSTR
MSDN is a good source of all windows api declarations.
I am not using 5.1 but I think it should works in this way.
hth
Kris

Krzysztof Dorko

Re: ADVAPI32.DLL -> RegQueryValueExA

Post by Krzysztof Dorko » 12 Feb 2008, 16:52

 Posted by:  Krzysztof Dorko 

Hi
Small correction: Try RegQueryValueExW instead of RegQueryValueEx since the
last one could be used only in c++ or similar kind of languages ( and is
declared in Winreg.h file) .
thx
Kris

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests