Posted: Sat Jan 13, 2007 12:56 am
Small Update:
drop support for libfile
unusable symbols removed ("__imp")
drop support for libfile
unusable symbols removed ("__imp")
http://www.purebasic.com
https://www.purebasic.fr/english/
r_hyde wrote:Sorry, no. It's not the first time I've been asked, either, since I usually go by r. hyde (or similar) and in programming circles the question does occasionally come up. Would that I had but a fraction of that *other* r. hyde's talent!@r_hyde: excuse the dumb ass question! Are you per-chance the R. Hyde of HLA fame?
Code: Select all
Import "Winspool.lib" ;{
CompilerIf #PB_Compiler_Unicode
GetDefaultPrinter(*name, stringsize.l) As "_GetDefaultPrinterW@8"
OpenPrinter(*pPrinterName, *phPrinter, *pDefault.PRINTER_DEFAULTS) As "_OpenPrinterW@12"
CompilerElse
GetDefaultPrinter(*name, stringsize.l) As "_GetDefaultPrinterA@8"
OpenPrinter(*pPrinterName, *phPrinter, *pDefault.PRINTER_DEFAULTS) As "_OpenPrinterA@12"
CompilerEndIf
EndImport ;}
Code: Select all
Import "ole32.lib"
CoGetInstanceFromFile() As "_CoGetInstanceFromFile@32"
CoGetInstanceFromIStorage() As "_CoGetInstanceFromIStorage@28"
EndImport
And thanks for this too! I got a good laugh out of it!ts-soft wrote:Unix is user friendly... it's just selective about who its friends are!
Code: Select all
Import "Winspool.lib" ;{
GetdefaultprinterW(*name, stringsize.l) As "_GetDefaultPrinterW@8"
GetdefaultprinterA(*name, stringsize.l) As "_GetDefaultPrinterA@8"
EndImport ;}
Macro Getdefaultprinter(a,b)
CompilerIf #PB_Compiler_Unicode
GetdefaultprinterW(a,b)
CompilerElse
GetdefaultprinterA(a,b)
CompilerEndIf
EndMacro
Tks ts-softts-soft wrote:Small Update:
+ fixed parametercount
+ Open Lib from PB (ctrl+P)
donets-soft wrote:@Denis
I will add an optional function to generate Macros like: