![]() 'If we get here named printer was found and accessed and its hPrinter handle is '(OpenPrinterW(ByVal pPrinterName As Long, ByRef phPrinter As Long) As Long) PRINTERFOUND = OpenPrinterW(StrPtr(PrinterName), hPrinter) If Form1.PRINTERREADY = 9 Then GoTo Line1000 'exit. Set Printer = prnPrinter 'sets this as printer 'first select the named printer and check if it is installed Public Function IsPrinterReady(ByRef PrinterName As String)į = PrinterName 'show printer name at form1 ![]() SRet = Left$(sRet, InStr(sRet, Chr$(0)) - 1) 'this service function extracts a string (sRet) when fed with a pointer (lpstring)ĬopyMemory ByVal sRet, ByVal lpString, ByVal Len(sRet) ![]() Public Function StringFromPointer(lpString As Long, lMaxLength As Long) As String Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As Long) As Long Private Declare Function OpenPrinterW Lib "winspool.drv" (ByVal pPrinterName As Long, ByRef phPrinter As Long, Optional ByVal pDefault As Long) As Long Private Declare Function GetPrinterApi Lib "winspool.drv" Alias "GetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, BUFFER As Long, ByVal pbSize As Long, pbSizeNeeded As Long) As Long
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |