PC Review


Reply
Thread Tools Rate Thread

Converting Access 2.0 API's

 
 
Jim
Guest
Posts: n/a
 
      4th Aug 2003
I am trying to convert a (very) old Access 2.0 application
to Access 2002. The former uses the following function

Declare Function GetPrivateProfileString Lib "Kernel"
(ByVal lpApplicationName As String, ByVal lpKeyName As
Any, ByVal lpDefault As String, ByVal lpReturnedString As
String, ByVal nSize As Integer, ByVal lpFileName As
String) As Integer

which is then called in various places throughout the
application eg

lpSection = "Options"
lpEntry = "SystemDB"
lpDefault = ""
Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
GPPSReturnVal = GetPrivateProfileString(lpSection, ByVal
lpEntry, lpDefault, lpReturnVal, BUFSIZE, lpIniName)

The function doesn't exist in Access 2002. The first time
I ran it I got an error as the library KERNEL wasn't
found. I have tried replacing the Lib parameter with
Kernel32 but I still get an error.

I think the function returns the full pathname of the
database (which may be in a different location to the
front end database).

Any ideas?
 
Reply With Quote
 
 
 
 
JohnFol
Guest
Posts: n/a
 
      4th Aug 2003
It didn't exist in Access 2 either. It was an OS call.
Have a look at Q210115 "How to convet API calls from 16-bit to 32-bit"



"Jim" <(E-Mail Removed)> wrote in message
news:065601c35a77$ca7d8e60$(E-Mail Removed)...
> I am trying to convert a (very) old Access 2.0 application
> to Access 2002. The former uses the following function
>
> Declare Function GetPrivateProfileString Lib "Kernel"
> (ByVal lpApplicationName As String, ByVal lpKeyName As
> Any, ByVal lpDefault As String, ByVal lpReturnedString As
> String, ByVal nSize As Integer, ByVal lpFileName As
> String) As Integer
>
> which is then called in various places throughout the
> application eg
>
> lpSection = "Options"
> lpEntry = "SystemDB"
> lpDefault = ""
> Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
> GPPSReturnVal = GetPrivateProfileString(lpSection, ByVal
> lpEntry, lpDefault, lpReturnVal, BUFSIZE, lpIniName)
>
> The function doesn't exist in Access 2002. The first time
> I ran it I got an error as the library KERNEL wasn't
> found. I have tried replacing the Lib parameter with
> Kernel32 but I still get an error.
>
> I think the function returns the full pathname of the
> database (which may be in a different location to the
> front end database).
>
> Any ideas?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Access 2003 Navigation Groups to Access 2007 Marnie Microsoft Access 0 19th Mar 2010 09:15 PM
Fixed :) reports don't open in access 2003 after converting from Access 97 broozm@gmail.com Microsoft Access Reports 1 27th Sep 2006 04:28 AM
Command button problems after converting from Access 97 to Access 2000 jjlang@snet.net Microsoft Access 0 18th Jan 2006 05:15 PM
After converting Access 97 data to Access 2000 no numbers print =?Utf-8?B?TWljaGFlbCBMZWFm?= Microsoft Access Queries 2 19th Jul 2005 01:06 PM
Problem converting Access 2.0 db to Access 2000 - code not conver. =?Utf-8?B?Mi4wIHRvIDIwMDAgY29udmVydGVyIC0gQnJ1Y2U= Microsoft Access 0 22nd Apr 2005 02:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 PM.