|
-
Jan 4th, 2001, 08:38 PM
#1
Thread Starter
Lively Member
Hi,
I've tried to load the whole of my original VB 3 program in VB 6. However, whenever I tried to run it, an error will occur "Run Time Error 53: File not found: kernel". (I did not change the program's original directory.)
The following is the code is I've used:
*******************************************************
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, lpString As Any, ByVal lplFileName As String) As Integer
fname = "treasury.ini"
sectionName = "Treasury"
entryname = "TreasuryDB"
defaultDB = "c:\treasury\treasury.mdb"
keyvalue = String$(57, 0)
rc = GetPrivateProfileString(sectionName, entryname, defaultDB, keyvalue, Len(keyvalue), fname)
*******************************************************
Can anyone help me to resolve this problem?
Thank you very much.
Regards.
-
Jan 4th, 2001, 09:20 PM
#2
Hyperactive Member
i really don't know but should it be Kernel32
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
and adjust the rest of your code accordingly, this is just a guess by the way
[Edited by PJB on 01-04-2001 at 09:25 PM]
VB6.0 SP4
Windows 2000
I'm thinking of a number between
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
|