Avatar of Frans_Truyens
Frans_Truyens
Flag for Belgium asked on

Upgrading from Office 2013 to Windows 10: API call to 'kernel32'

I want to upgrade an existing Office 2013 32 bit application to Windows 10. But the library 'kernel32' does not exist anymore. How do I upgrade this?


Private 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
Microsoft AccessVBA

Avatar of undefined
Last Comment
Frans_Truyens

8/22/2022 - Mon
Michael Pfister

Can't check here. Imho it should be still there but the API is stone age. Its used to read from an INI file.
I'd change the stuff to store/retrieve the settings from the Windows registry.

i.e. http://vba-corner.livejournal.com/3054.html
Frans_Truyens

ASKER
I have to upgrade. So I can't change the code to something else. Does there exist an alternative for kernel32?
Michael Pfister

If you can't change the code you're stuck.
Still wonder why this happens .. any chance you're trying to run this under a 64 bit version of Office?
What is it? Access, Excel?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Michael Pfister

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Frans_Truyens

ASKER
Thanks. I will try that tomorrow morning.