How to get User Name In wrapper Credintial Provider RRS feed

  • Question

  • Hi,

    i customize wrapper Credential provider for windows 7 and there i just want to get the user name when i press my command link in credential tile. There i am able to get the domain\user name when my credential load using GetStringValue function its shows all the tiles domain\user name (e.g if on CAD screen there are three tiles then it will show for all tile one by one) but i just want to get the user name after selection of a single tile or at the time of selecting a single tile,i am unable to get the user name if selected tile is not other user tile.

    otherwise if there are any way to get that which tile i selected in all tiles. please tell me if there are any solution 

    • Moved by Jesse Jiang Wednesday, April 4, 2012 6:50 AM (From:Visual C++ General)
    Monday, April 2, 2012 2:48 PM

All replies

  • Hello,

    I think your issue should be raised in the Application Security for Windows Desktop
    . I believe they will know more information of this issue than us, and I will move this one to that forum.

    Thanks for your understanding,

    Best regards,

    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, April 4, 2012 6:50 AM
  • Hi All,

    Please any one can tell how can i get the user name at the time of login in wrapper credential provider or at the time of selected credential tile, is there ant way to get the user name of the selected tile in wrapper credential provider... 



    Sunday, April 22, 2012 6:07 PM
  • Depending on what credential provider you are wrapping the field identifier of user name field may vary (i.e. some credential providers might not even expose a username field in their credential tiles - this totally depends on the credential provider implementer). However, you can always enumerate all the fields available in each credential tile or you could hard code the username field Id (= not very reliable as the field Id might change without any notice from the credential provider implementer). The following code can show you how you could iterate through all the credential tile's fields:

    DWORD fieldCount = 0;
    for (DWORD i = 0; i < fieldCount; i++)
          GetFieldDescriptorAt(i, &fieldDec);
          if (fieldDec)
             // some code here using the field description 


    Nima Sharifimehr.
    sbucsc at yahoo dot com

    Wednesday, April 25, 2012 6:18 PM