locked
[Windows Security] pop-up lost focus - CredUIPromptForWindowsCredentials RRS feed

  • Question

  • Dear All

    I have small program access to Shared Folder on another PC, my PC and Shared's PC have different domain.
    My program have [Check access] button, i will using this button to check connect success or not. If connection need permission to access to shared folder, [Windows Security] pop-up is displayed.
    In my source code, i using CredUIPromptForWindowsCredentials to create [Windows Security] pop-up.

    I have tested on my PC, all are so good, all are working so good.
    But when i move my program to another PC (Window 10 - Customize by turn-off some API, Services, etc ... I call this PC is PCBugs). Bug is occurs.

    Bug is:
    - When I click to [Check access] button by mouse, [Windows Security] pop-up is freeze, i can't input to [Windows Security], can't move, can't close, do nothing ...
    - When I click to [Check access] button by Enter key, [Windows Security] pop-up is ok, i cant input to [Windows Security], can move, can close, do anything ...

    I have investigated and found something. I have set "Handle" of Parent form to pUiInfo.hwndParent parameter.
    "Handle" have some trouble on PCBugs , i don't know why, on my PC (Dev PC), it work ok.

    To fix this bug: I don't set "Handle" of Parent form to pUiInfo.hwndParent parameter (If the hwndParent member of the CREDUI_INFO structure is NULL, the function displays a dialog box centered on the screen.). Bug is fixed.

    But is not my expected, I think on PCBugs, something is turn-off, or something different between PCBugs and Dev PC. I think best way is config environment on PCBugs.

    Please give me some suggestion!


    • Edited by Đỗ Bùi Quý Thursday, October 25, 2018 3:11 AM Change title
    Thursday, October 25, 2018 2:57 AM

All replies

  • Hi Đỗ Bùi Quý,

    Thank you for posting here.

    For your question, is there any difference of environment between your PC and another PC? In your description, you mentioned that the another PC Customize by turn-off some API, Services, etc …. Does it have any effect to your program?

    Without your code, I could not make sure what cause the error. Please check the environment first.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 25, 2018 6:35 AM
  • Hi Wendy Zang!

    Thank you for your feedback!

    I have to do that, but i don't know what api, service effect to my program. I have check environment on Deployed PC, but that PC is restricted access to system.

    So I think, I will fix this bug by another way.

    Thursday, October 25, 2018 8:28 AM
  • Hi Đỗ Bùi Quý,

    Sorry for that. Without more information I could not give more suggestions. If you could fix this bug by another way, it is grateful to sharing with us.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, October 31, 2018 6:14 AM