Jump to content
Excelsior Forums

atessier

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About atessier

  • Rank
    Newbie
  • Birthday 01/01/01
  1. Help needed with RegQueryValueEx

    Hi Eveyone, I'm trying to query a registry key value with xFunction. The signature of the API call is as follow : LONG RegQueryValueEx( HKEY hKey, LPCTSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData ); HKEY hkey, is an Handle to an Open key returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be of one of predefined keys : HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE ...many others Whatever example I find on the net puts one of the predefined keys as an argument for hkey. All of the C example includes windows.h which must set the values. Other VB examples defines the constant HKEY_LOCAL_MACHINE as being &H80000002. The problem I have is how too pass this value (either HKEY_LOCAL_MACHINE or H8000002) as a parameter in xFunction ? how do I transalate this predefine key for the first argument ? CODE : xFunction f=new xFunction("Advapi32", "int RegQueryValueExA(int, CSTRING, int, int*, CSTRING, int)"); Argument[] arg = new Argument[6]; arg[0] = new Argument(); when I put the decimal equivalent of H80000002 which is 2147483650 it is out of range for an Integer. Any help or working example of RegQueryValueEx integration in xFunction would be appreciated Andr?
×