Link to home
Create AccountLog in
Avatar of Frans_Truyens
Frans_TruyensFlag 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
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

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
Avatar of Frans_Truyens

ASKER

I have to upgrade. So I can't change the code to something else. Does there exist an alternative for kernel32?
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?
ASKER CERTIFIED SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks. I will try that tomorrow morning.