WinApi calls for certain console commands not present

Windows specific forum
kparadine
New User
New User
Posts: 6
Joined: Sun Sep 23, 2018 3:18 am

WinApi calls for certain console commands not present

Post 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.
Bitblazer
Enthusiast
Enthusiast
Posts: 736
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: WinApi calls for certain console commands not present

Post 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.
kparadine
New User
New User
Posts: 6
Joined: Sun Sep 23, 2018 3:18 am

Re: WinApi calls for certain console commands not present

Post by kparadine »

Bitblazer wrote: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.
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.
Post Reply