Wine OleView compiled with PellesC

Started by TimoVJL, March 12, 2013, 08:11:45 PM

Previous topic - Next topic

TimoVJL

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.
May the source be with you

czerny

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

I have made two changes:

RegEnumValueW needs a buffer for value name:

        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:


            // 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