- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the 9.1 compiler and the XP operating system. The following codesegment compiles and links OK, but when executed the call to GetUserName() produces an Unhandled Exception, Access Violation Reading Location .....
INTEGER(4) iret, iSize
CHARACTER(50) szText
iSize = 50
iret = GetUserName(szText, iSize)
Any comments would be appreciated.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pass loc(iSize). The interface defined in ADVAPI32 declares that argument as an address passed by value. I'll see about getting that improved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. Using Loc(iSize) worked fine.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page