i swict to dllcall and used this code. this dllcall is suppose to fill $sPaperNamesList with the paper list for the selected printer, i plan on using this methis to get the with and height of the paper later in code, but i get nothing
Const $DC_BINS = 6
Const $DC_BINNAMES = 12
Const $DC_PAPERNAMES = 16
Const $DC_PAPERS = 2
Const $DC_PAPERSIZE = 3
$lPaperCount = DllCall("winspool.drv", "long", "DeviceCapabilitiesA", "str", $objPrinter.Name, "str", $objPrinter.PortName, "int", $DC_PAPERNAMES, "str", Chr(0), "long", 0)
$numPaper[$lPaperCount[0]]
; Pad the variable to accept 64 bytes for each paper name.
$sPaperNamesList = _StringRepeat(0, $lPaperCount[0]*64)
;Get paper names
$lPaperCount = DllCall("winspool.drv", "long", "DeviceCapabilitiesA", "str", $objPrinter.Name, "str", $objPrinter.PortName, "int", $DC_PAPERNAMES, "str", $sPaperNamesList, "long", 0)