DialogBox() fails on Vista if parent hwnd is an external process
window handle
Hello,
I am developing COM object, and one of the methods shall display
dialog box:
STDMETHODIMP Xxx::InvokeUI(/*[in]*/ HWND hwndParent)
{
DialogBox(g_hDllInstance, MAKEINTRESOURCE(IDD_XXX_SETTINGS),
hwndParent, (DLGPROC)XxxDialogProc);
...
}
The hwndParent param is a window handle provided by external
application. In this case DialogBox fails with 'Access Denied' error.
But if null is specified as dialog's parent window, dialog box is
successfully displayed.
As per Vista requirements, application to have access to external
window handles, must:
1. have manifest with uiAccess parameter set to true
2. be Authenticode signed
3. resides in a protected location
All this requirements are met.
What is wrong?
Thanks,
Maxim.
date: Thu, 17 Jul 2008 04:06:05 -0700 (PDT)
author: unknown