NO

Author Topic: Wine OleView compiled with PellesC  (Read 3707 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Wine OleView compiled with PellesC
« on: March 12, 2013, 08:11:45 PM »
Just Wine OleView compiled with PellesC with some modifications.
For those who likes to hunt errors.

EDIT: test project for TypeLib.c, put that project to different folder.
« Last Edit: March 16, 2013, 05:53:05 PM by timovjl »
May the source be with you

czerny

  • Guest
Re: Wine OleView compiled with PellesC
« Reply #1 on: March 12, 2013, 11:29:30 PM »
Thank you timovjl for your work!
But as a friend of ancient operating systems, I would like to say that GetRegValueW is available only in Vista and above.

czerny

  • Guest
Re: Wine OleView compiled with PellesC
« Reply #2 on: March 14, 2013, 12:40:54 AM »
I have made two changes:

RegEnumValueW needs a buffer for value name:

Code: [Select]
        if(RegQueryValueW(hCurKey, NULL, buffer, &lenBuffer) == ERROR_SUCCESS && *buffer)
            U(tvis).item.pszText = buffer;
        else
if(RegEnumValueW(hCurKey, 0, valName, &lenBuffer, NULL, NULL,
                    (LPBYTE)buffer, &lenBufferHlp) == ERROR_SUCCESS && *buffer)

Win2K compatibly:

Code: [Select]
            // if(RegGetValueW(hKey, NULL, wszEnableDCOM, RRF_RT_REG_SZ, NULL, buffer, &bufSize) != ERROR_SUCCESS)
if(RegQueryValueExW(hKey, wszEnableDCOM, NULL, NULL, (LPBYTE)buffer, &bufSize) != ERROR_SUCCESS)
            {
                bufSize = sizeof(wszYes);
                RegSetValueExW(hKey, wszEnableDCOM, 0, REG_SZ, (BYTE*)wszYes, bufSize);
            }

            CheckDlgButton(hDlgWnd, IDC_ENABLEDCOM,
                    buffer[0]=='Y' ? BST_CHECKED : BST_UNCHECKED);

            bufSize = sizeof(buffer);
            // if(RegGetValueW(hKey, NULL, wszEnableRemote, RRF_RT_REG_SZ, NULL, buffer, &bufSize) != ERROR_SUCCESS)
if(RegQueryValueExW(hKey, wszEnableRemote, NULL, NULL, (LPBYTE)buffer, &bufSize) != ERROR_SUCCESS)

czerny