Page 1 of 1

GetProcAddress_() only ASCII

Posted: Fri Sep 28, 2018 8:22 am
by RSBasic
Hello

GetProcAddress_() does not work with current PB version because Unicode is always used.
This WinAPI function only works in ASCII mode.

Workarround:

Code: Select all

Import "kernel32.lib"
  GetProcAddress(hModule, lpProcName.p-ascii)
EndImport
@Fred & @freak
Can you always run GetProcAddress_() in ASCI mode, so you don't have to use the workaround code? Thank you

Re: GetProcAddress_() only ASCII

Posted: Fri Sep 28, 2018 9:18 am
by fryquez
Your current workaround would make it impossible to use ordinals instead of strings.

But +1 for a wrapper function that first checks if lpProcName is bigger than a word
and convert the string if needed.