Link to home
Start Free TrialLog in
Avatar of SAMEER QASIM
SAMEER QASIM

asked on

Looking for 64 bit version of Declare Function GetUserName

I am using getusername function to use Windows login for security.  However, when I tried to use the mdb on a 64 bit setup I get the following error msg.  

The code in this project must be updated to 64bit systems.  Please review and updatet declare statetments and then mark them with the PtrSafe atribute.

What do I need to do this?
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

64:
Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
   (ByVal lpBuffer As String, nSize As LongPtr) As Long
SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- crystal (strive4peace) - Microsoft MVP Access (https:#a42141408)
-- Jim Dettman (Microsoft MVP/ EE MVE) (https:#a42141404)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer