DYMO-Printer SDK Wrapper for PureBasic
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

116 lines
3.7 KiB

EnableExplicit
; if you want to change some settings, create your own constants before include this file
CompilerIf Defined(DYMO_DLL_ImportFile_32bit, #PB_Constant) = #False
#DYMO_DLL_ImportFile_32bit = "DYMO32.lib"
CompilerEndIf
CompilerIf Defined(DYMO_DLL_ImportFile_64bit, #PB_Constant) = #False
#DYMO_DLL_ImportFile_64bit = "DYMO64.lib"
CompilerEndIf
CompilerIf Defined(INCLUDE_DYMO, #PB_Constant) ; if DYMO / DYMO_DLL is already included
CompilerError "<" + #PB_Compiler_Filename + "> DYMO already included !!"
CompilerElse
#INCLUDE_DYMO = #True
CompilerEndIf
CompilerSelect #PB_Compiler_Processor
CompilerCase #PB_Processor_x86
#INTERNAL_DYMO_Import_File = #DYMO_DLL_ImportFile_32bit
Import #INTERNAL_DYMO_Import_File
INTERNAL_DYMO_GetCurrentPrinterName() As "_DYMO_GetCurrentPrinterName@0"
INTERNAL_DYMO_NextPrinter() As "_DYMO_NextPrinter@0"
INTERNAL_DYMO_MRU_NextFile() As "_DYMO_MRU_NextFile@0"
INTERNAL_DYMO_NextObject() As "_DYMO_NextObject@0"
INTERNAL_DYMO_GetText(Object.s) As "_DYMO_GetText@4"
INTERNAL_DYMO_MRU_GetFileName(Index) As "_DYMO_MRU_GetFileName@4"
EndImport
CompilerCase #PB_Processor_x64
#INTERNAL_DYMO_Import_File = #DYMO_DLL_ImportFile_64bit
Import #INTERNAL_DYMO_Import_File
INTERNAL_DYMO_GetCurrentPrinterName() As "DYMO_GetCurrentPrinterName"
INTERNAL_DYMO_NextPrinter() As "DYMO_NextPrinter"
INTERNAL_DYMO_MRU_NextFile() As "DYMO_MRU_NextFile"
INTERNAL_DYMO_NextObject() As "DYMO_NextObject"
INTERNAL_DYMO_GetText(Object.s) As "DYMO_GetText"
INTERNAL_DYMO_MRU_GetFileName(Index) As "DYMO_MRU_GetFileName"
EndImport
CompilerEndSelect
Enumeration DYMO_Tray
#DYMO_Tray_Unknown = -1
#DYMO_Tray_Left = 0
#DYMO_Tray_Right = 1
#DYMO_Tray_Auto = 2
EndEnumeration
#DYMO_POSTNET_Pos_None = "NONE"
#DYMO_POSTNET_Pos_Top = "TOP"
#DYMO_POSTNET_Pos_Buttom = "BUTTOM"
Import #INTERNAL_DYMO_Import_File
DYMO_Init()
DYMO_Release()
DYMO_ExaminePrinters()
DYMO_SelectPrinter(PrinterName.s)
DYMO_IsTwinTurboPrinter(PrinterName.s)
DYMO_GetCurrentPaperTray()
DYMO_StartPrintJob()
DYMO_StopPrintJob()
DYMO_OpenLabel(File.s, ShowDialogBoxIfFail = #False)
DYMO_SaveLabel(File.s = #Null$)
DYMO_PrintLabel(Copies = 1, ShowDialog = #False, Tray = #DYMO_Tray_Unknown)
DYMO_IsPrinterOnline(PrinterName.s)
DYMO_OpenMemory(*Buffer, BufferSize)
DYMO_SaveMemory()
DYMO_OpenURL(URL.s)
DYMO_MRU_ExamineFiles()
DYMO_MRU_GetFileCount()
DYMO_MRU_OpenFile(Index)
DYMO_SetPrintMode(HighQuality = #True)
DYMO_SmartPasteFromClipboard()
DYMO_SmartPasteFromFile(File.s)
DYMO_SmartPasteFromString(Text.s)
DYMO_ProxySetup(Protocol.s, ServerName.s, Port.l, ProxyBypass.s, UserName.s, Password.s)
DYMO_ProxyClearSettings()
DYMO_ProxyBypass(Set = #True) ; #False = default
DYMO_ExamineObjects(VariableOnly = #True)
DYMO_SetAddress(Address.s, Index = 1)
DYMO_SetField(Object.s, Text.s)
DYMO_GetAddressFieldCount()
DYMO_SetAddressPOSTNET(POSTNET_Pos.s, Index = 1)
DYMO_SetImageFile(Object.s, File.s)
DYMO_SetImageURL(Object.s, URL.s)
DYMO_PasteFromClipboard(Object.s)
DYMO_PasteImageFromClipboard(Object.s)
EndImport
Macro DYMO_GetCurrentPrinterName()
PeekS(INTERNAL_DYMO_GetCurrentPrinterName())
EndMacro
Macro DYMO_NextPrinter()
PeekS(INTERNAL_DYMO_NextPrinter())
EndMacro
Macro DYMO_MRU_NextFile()
PeekS(INTERNAL_DYMO_MRU_NextFile())
EndMacro
Macro DYMO_NextObject()
PeekS(INTERNAL_DYMO_NextObject())
EndMacro
Macro DYMO_GetText(__Object_s__)
PeekS(INTERNAL_DYMO_GetText(__Object_s__))
EndMacro
Macro DYMO_MRU_GetFileName(__Index__)
PeekS(INTERNAL_DYMO_MRU_GetFileName(__Index__)
EndMacro
DisableExplicit
; CursorPosition = 1
; Folding = A5
; EnableXP
; CompileSourceDirectory
; EnableCompileCount = 0
; EnableBuildCount = 0
; EnableExeConstant

Impressum | Datenschutz