// JP opened flex table

Click to See Complete Forum and Search --> : OleCreatePropertyFrame


sockman
July 13th, 2008, 10:44 PM
I have the following code which is designed to open a property pages dialog for DirectX effects. This code works fine on XP but on Vista the call to OleCreatePropertyFrame returns E_FAIL and the dialog box does not show. Debugging shows that all objects and values before calling this function are identical. Any ideas what might be going on?

void LSRCDirectXEffect::DisplayEditor(LWin hwndDlg)
{
if (!pMediaObject) return;
ISpecifyPropertyPages* pSpecify;
HRESULT hr = pMediaObject->QueryInterface(IID_ISpecifyPropertyPages, (void**)&pSpecify);

if (SUCCEEDED(hr)) {
CAUUID caGUID;
pSpecify->GetPages(&caGUID);
pSpecify->Release();

HRESULT hres = OleCreatePropertyFrame(hwndDlg, 0, 0, L"Properties", 1, (IUnknown**)&pMediaObject, caGUID.cElems, caGUID.pElems, 0, 0, NULL);
if (SUCCEEDED(hres)) {
LTRACE("OK");
} else {
LTRACE("FAIL");
}
CoTaskMemFree(caGUID.pElems);
}
}

//JP added flex table