agarwaldvk
04-27-2010, 05:52 PM
Hi Everybody
I am trying to get the details of the currently logged on user as a part of the process for generating a report - the requirement being that the report should contain the name (and not the userid - which I can get from the API function "apiGetUserName()" of the user that generated that report so that he/she can be contacted should anyone have any clarifications on that report.
For example, the above mentioned API function will give me the userid like "A256322" but it wouldn't tell me the name of that user. I need the name as in "John Smith".
I am told that there is an API function that I can use to get that detail and that is called "LookupAccountName()" API function but that needs a hell of a lot of parameters loke so :-
LookupAccountNameA(lpSystemName As String, ByVal lpAccountName As String, sid As Any, cbSid As Long, ByVal ReferencedDomainName As String, cbReferencedDomainName As Long, peUse As Long) As Long
Can this function get the values for these arguments by itself or is there an easier way to do so, that is, are there API functions that can be used as feeds for the various arguments to this function?
Best regards
Deepak Agarwal
I am trying to get the details of the currently logged on user as a part of the process for generating a report - the requirement being that the report should contain the name (and not the userid - which I can get from the API function "apiGetUserName()" of the user that generated that report so that he/she can be contacted should anyone have any clarifications on that report.
For example, the above mentioned API function will give me the userid like "A256322" but it wouldn't tell me the name of that user. I need the name as in "John Smith".
I am told that there is an API function that I can use to get that detail and that is called "LookupAccountName()" API function but that needs a hell of a lot of parameters loke so :-
LookupAccountNameA(lpSystemName As String, ByVal lpAccountName As String, sid As Any, cbSid As Long, ByVal ReferencedDomainName As String, cbReferencedDomainName As Long, peUse As Long) As Long
Can this function get the values for these arguments by itself or is there an easier way to do so, that is, are there API functions that can be used as feeds for the various arguments to this function?
Best regards
Deepak Agarwal