locked
INapComponentConfig::InvokeUI - cant make settings dialog to be parent to hwndParent RRS feed

  • Question

  • Hello,

    I am developing SHV with INapComponentConfig interface support.

    The problem occurs in InvokeUI method:

    STDMETHODIMP Xxx::InvokeUI(/*[in]*/ HWND hwndParent)   
    {   
            DialogBox(g_hDllInstance, MAKEINTRESOURCE(IDD_XXX_SETTINGS),   
    hwndParent, (DLGPROC)XxxDialogProc);   
            ...   
    }  

    If hwndParent param is used in DialogBox, dialog box is not shown and call fails with 'Access Denied' error.
    But if null is specified as dialog's parent window, dialog box is successfully displayed,
    and it is not acceptable as settings dialog displayed under the parent window.

    My SHV met Vista requirements for applications UAC compatibility:

    1. It has manifest with uiAccess parameter set to true

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">  
    ...  
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">  
        <security> 
          <requestedPrivileges> 
            <requestedExecutionLevel level="requireAdministrator" uiAccess="true"></requestedExecutionLevel> 
          </requestedPrivileges> 
        </security> 
      </trustInfo> 
    </assembly> 

    2. It is authenticode signed.
    3. It resides in a protected location (\Program Files\Xxx)

    Could you please kindly let me know what is wrong?

    Pl. excuse me for posting the question to this thread, but there still were no replies on other forums.

    Thanks in advance,
    Maxim.

    Friday, July 18, 2008 11:29 AM

Answers