Page 1 of 1
WinApi calls for certain console commands not present
Posted: Sun Sep 23, 2018 3:23 am
by kparadine
Purebasic 5.62 x64
POLINK: error: Unresolved external symbol 'GetNumberOfConsoleFonts'
POLINK: error: Unresolved external symbol 'SetConsoleFont'
----
Can I just hack these kernel32.dll calls in myself somehow?
Thank you.
Re: WinApi calls for certain console commands not present
Posted: Sun Sep 23, 2018 7:29 am
by Bitblazer
Those calls seem to be undocumented functions considering
http://blogs.microsoft.co.il/pavely/200 ... ole-fonts/ . You should be able to add those undocumented functions with
IMPORTC or by using
prototypes
So i don't see a bug related to PB in any way here.
Re: WinApi calls for certain console commands not present
Posted: Mon Sep 24, 2018 3:50 am
by kparadine
Well, two things. One, using the Import with W10Pro and the x64 build of PB 5.62 on kernel32.dll results in POLINK: Fatal error: Invalid machine type in object 'kernel32.dll'. So that's a no go. Also, doesn't appear like the Import command works like OpenLibrary inasmuch as it doesn't search the OS default library dirs. That could be worked around, but not the error.
There is also the issue that this apparently worked in the past in PB with OpenLibrary() and GetFunction().
Here.