Import "user32.lib"
MessageBoxTimed(a.l,b.p-unicode,c.p-unicode,d.l,e.l,f.l) As "_MessageBoxTimeoutW@24"
EndImport
MessageBoxTimed(0,"What do you know for sure?","Hey there!",#MB_OK|#MB_SYSTEMMODAL|#MB_ICONQUESTION, 0, 3000)
But this doesn't work with the user32.lib from pb
The user32.lib from PellesC works fine!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Prototype MessageBoxTimed(hWnd.l, lpText.s,lpCaption.s, uType.l, wLanguageID.w, dwMilliseconds.l)
Global MessageBoxTimed.MessageBoxTimed = GetProcAddress_(GetModuleHandle_("user32.dll"),"MessageBoxTimeoutA")
MessageBoxTimed(0,"What do you know for sure?","Hey there!",#MB_OK|#MB_SYSTEMMODAL|#MB_ICONQUESTION, 0, 3000)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
@DarkDragon
I have never see any exe compiled by pb that have no DLL Dependency to User32.dll, so the DLL is loaded. Kernel32.dll is also loaded
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
ts-soft wrote:@DarkDragon
I have never see any exe compiled by pb that have no DLL Dependency to User32.dll, so the DLL is loaded. Kernel32.dll is also loaded
Hmm... ok.
Afaik LoadLibrary_ (what PB's OpenLibrary uses) returns the same handle if it was already loaded. So there's no real difference between your's and the one of netmaestro except the one of netmaestro maybe has more future, if Fred takes the "user32.dll" out of the standardly linked libraries.
@DarkDragon
Better is import of user32.lib, but the version included in pb is to old. Many functions are missing
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.