|
-
Jul 11th, 2001, 10:03 AM
#1
INI files
Can anyone see anything wrong with this?
I keep getting a runtime errror 49 "bad DLL calling convention". I am using a "c:\apps\stock\test.ini" file and trying to retrieve a "fred" variable
Private Declare Function GetPrivateProfileString Lib "kernel32"
Alias _
"GetPrivateProfileStringA" _
(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long, _
ByVal lpFileName As String)
Private Sub Command1_Click()
Dim nChar As Long
Dim ReturnedString As String
Dim Parsed() As String 'not used
ReturnedString = String(512, 0)
nChar = GetPrivateProfileString("test", "fred", "", ReurnedString, 512, "c:\apps\stock\test.ini")
Debug.Print (nChar)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|