Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 17 Jul 2008 04:06:05 -0700 (PDT),    group: microsoft.public.platformsdk.shell        back       


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

Re: DialogBox() fails on Vista if parent hwnd is an external process window handle   
Fixed.

Additional registration keys is required for COM objects to avoid UAC
penalties:
http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx.
date: Fri, 18 Jul 2008 09:25:17 -0700 (PDT)   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us