How to updated statement with PtrSafe keyword

BizBoy

Board Regular
Joined
Jul 26, 2012
Messages
116
Hi,
I have posted a generic query regarding ‘PtrSafekeyword’ few days ago.
However not able to find my post hence posting as new thread.
I have below line of code in my macro and am required to update it with ‘PtrSafe keyword’

Code:
[FONT=Calibri]Private Declare Function GetPrivateProfileStringLib "kernel32" Alias "GetPrivateProfileStringA" (ByVallpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault AsString, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileNameAs String) As Long[/FONT]
I am new to MS Access and have no idea about how this.
Can anyone please help how to do it.
 
Last edited:

stumac

Active Member
Joined
Jul 16, 2010
Messages
470
Add in ptrsafe after the declare statement:

Code:
Private Declare [COLOR=#0000ff]PtrSafe[/COLOR] Function GetPrivateProfileStringLib "kernel32" Alias "GetPrivateProfileStringA" (ByVallpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault AsString, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileNameAs String) As Long
 

Forum statistics

Threads
1,077,895
Messages
5,337,054
Members
399,120
Latest member
Sravankumar

Some videos you may like

This Week's Hot Topics

Top