Results 1 to 2 of 2

Thread: Please help with registry access

  1. #1

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394

    Please help with registry access

    Hello,

    I am trying to convert Visual Basic Registry Access to C++ functions and i have a lot of errors about conversions but i have no idea how to fix them.

    PHP Code:
    charRegQueryStringValue (HKEY__keycharcValue)
    {
    ulongiResult;
    ulongiValueType;
    ulong iBuffSize;
    unsigned char zBuff;

    iResult RegQueryValueEx (keycValueNULLiValueType, &zBuffiBuffSize);

    //    if (iResult == 0){
    //        if (iValueType == 1){
    //            char zBuff[iBuffSize];            
    //                iResult =  RegQueryValueEx (key, cValue, NULL, iValueType, &zBuff, iBuffSize);
    //        }
    //    }

    }

    charGetSetting(HKEY__keycharcPath[], charcValue[])
    {
        
    //Read a setting from registry
        
    unsigned long int hKey;
        
    unsigned short int hDataType;
        
    char zBuff[256];

        
    RegOpenKey (keycPath*, hKey);
        
    strcpy(zBuffRegQueryStringValue (&hKeycValue);
        
    RegCloseKey (hKey);

    I am a newbie to C++. Please help me.
    Thanks,
    VS.NET 2003

    Need to email me?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Please help with registry access

    I fixed errors, but I'm too lazy to explain them now.

    Originally posted by made_of_asp
    Hello,

    I am trying to convert Visual Basic Registry Access to C++ functions and i have a lot of errors about conversions but i have no idea how to fix them.

    PHP Code:
    charRegQueryStringValue (HKEY keycharcValue)
    {
    LONG iResult;
    DWORD iValueType;
    DWORD iBuffSize;
    BYTE zBuff[100];

    iResult RegQueryValueEx (keycValueNULL, &iValueTypezBuff, &iBuffSize);

    //    if (iResult == 0){
    //        if (iValueType == 1){
    //            char zBuff[iBuffSize];            
    //                iResult =  RegQueryValueEx (key, cValue, NULL, iValueType, &zBuff, iBuffSize);
    //        }
    //    }

    }

    charGetSetting(HKEY keycharcPathcharcValue)
    {
        
    //Read a setting from registry
        
    HKEY hKey;
        
    unsigned short int hDataType;
        
    char zBuff[256];

        
    RegOpenKey (keycPath, &hKey);
        
    strcpy(zBuffRegQueryStringValue (hKeycValue); // function does not exist
        
    RegCloseKey (hKey);

    I am a newbie to C++. Please help me.
    Thanks,
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width