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

Frans_Truyens
Frans_Truyens used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

Author

Commented:
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?
The file your app requires should be under

C:\Windows\system32\kernel32.dll (32 bit OS)
C:\Windows\sysWow64\kernel32.dll (64 bit OS)

Author

Commented:
Thanks. I will try that tomorrow morning.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial