ADVAPI32.DLL -> RegQueryValueExA

forum.gupta.bugreport (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

ADVAPI32.DLL -> RegQueryValueExA

Post by NewsgroupServer » 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.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

ADVAPI32.DLL -> RegQueryValueExA

Post by NewsgroupServer » 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 ?

Attachment: registr.apl

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

ADVAPI32.DLL -> RegQueryValueExA

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

ADVAPI32.DLL -> RegQueryValueExA

Post by NewsgroupServer » 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 [Crawler] and 0 guests