Everything else that doesn't fall into one of the other PB categories.
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Thu Apr 27, 2006 4:10 am
The command "SetConsoleDisplayMode_" gives here a polink error
Code: Select all
dwOldMode=0
Result=GetConsoleDisplayMode_(@dwOldMode)
hOut=GetStdHandle_(#STD_OUTPUT_HANDLE)
switch=1
SetConsoleDisplayMode_(hOut, switch, @dwOldMode)
Last edited by
va!n on Wed May 10, 2006 2:42 am, edited 1 time in total.
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Thu Apr 27, 2006 10:03 pm
polink error with following API call from User32.dll too...
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Fred
Administrator
Posts: 18557 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri Apr 28, 2006 2:12 pm
GetInputDesktop_() is fixed. But for SetConsoleDisplay() it's not supported in the MS kernel32.lib file, while GetConsoleDisplay() is... Weird, so i removed from the build in PB declaration, you will have to use OpenLibrary()/GetFunction() to fix it.
Trond
Always Here
Posts: 7446 Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway
Post
by Trond » Fri Apr 28, 2006 3:48 pm
netmaestro
PureBasic Bullfrog
Posts: 8453 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Fri Apr 28, 2006 3:55 pm
Code: Select all
If OpenLibrary(0,"kernel32.dll")
Debug GetFunction(0,"GetConsoleDisplayMode")
Debug GetFunction(0,"SetConsoleDisplayMode")
CloseLibrary(0)
EndIf
The functions are in the dll anyways, but I guess the set version's not available in the lib?
Code: Select all
Import "kernel32.lib"
GetConsoleDisplayMode(a.l)
SetConsoleDisplayMode(a.l)
EndImport
Getconsoledisplaymode(1)
Setconsoledisplaymode(1)
If you run this snippet you get an unresolved external on SetConsoleDisplayMode, but Get is ok. Comment the Set out and no errors. So it can't be in there.
BERESHEIT
Trond
Always Here
Posts: 7446 Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway
Post
by Trond » Fri Apr 28, 2006 4:12 pm
But did you test it with Microsoft's lib?
netmaestro
PureBasic Bullfrog
Posts: 8453 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Fri Apr 28, 2006 4:16 pm
Code: Select all
Import "d:\platform sdk\lib\kernel32.lib"
GetConsoleDisplayMode(a.l)
SetConsoleDisplayMode(a.l)
EndImport
Getconsoledisplaymode(1)
Setconsoledisplaymode(1)
Yup. Same deal.
BERESHEIT
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Fri Apr 28, 2006 4:17 pm
MSDN wrote:
Requires Windows Vista or Windows XP.
I guess that's the reason why the lib shipped with PB doesn't support it.
Good programmers don't comment their code. It was hard to write, should be hard to read.
Fred
Administrator
Posts: 18557 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri Apr 28, 2006 4:32 pm
I tested with the kernel32.lib from the VC Express 2005 package which should be uptodate, and it's not supported.
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Fri Apr 28, 2006 4:33 pm
long live microsoft
Good programmers don't comment their code. It was hard to write, should be hard to read.
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Wed May 10, 2006 2:41 am
fred wrote: But for SetConsoleDisplay() it's not supported in the MS kernel32.lib file, while GetConsoleDisplay() is... Weird, so i removed from the build in PB declaration, you will have to use OpenLibrary()/GetFunction() to fix it.
PB v4 final:
using "SetConsoleDisplayMode_ " with v4 final, gives a polink error. i think you forgot to delete this command from the list (as it should only work with using import lib)!? I think using the direct API call, should allert something like "unknown command" instead a polink error ^^
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Fred
Administrator
Posts: 18557 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Sun Aug 31, 2008 3:35 pm
Fixed.