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

  1. EnableExplicit
  2. ; if you want to change some settings, create your own constants before include this file
  3. CompilerIf Defined(DYMO_DLL_ImportFile_32bit, #PB_Constant) = #False
  4. #DYMO_DLL_ImportFile_32bit = "DYMO32.lib"
  5. CompilerEndIf
  6. CompilerIf Defined(DYMO_DLL_ImportFile_64bit, #PB_Constant) = #False
  7. #DYMO_DLL_ImportFile_64bit = "DYMO64.lib"
  8. CompilerEndIf
  9. CompilerIf Defined(INCLUDE_DYMO, #PB_Constant) ; if DYMO / DYMO_DLL is already included
  10. CompilerError "<" + #PB_Compiler_Filename + "> DYMO already included !!"
  11. CompilerElse
  12. #INCLUDE_DYMO = #True
  13. CompilerEndIf
  14. CompilerSelect #PB_Compiler_Processor
  15. CompilerCase #PB_Processor_x86
  16. #INTERNAL_DYMO_Import_File = #DYMO_DLL_ImportFile_32bit
  17. Import #INTERNAL_DYMO_Import_File
  18. INTERNAL_DYMO_GetCurrentPrinterName() As "_DYMO_GetCurrentPrinterName@0"
  19. INTERNAL_DYMO_NextPrinter() As "_DYMO_NextPrinter@0"
  20. INTERNAL_DYMO_MRU_NextFile() As "_DYMO_MRU_NextFile@0"
  21. INTERNAL_DYMO_NextObject() As "_DYMO_NextObject@0"
  22. INTERNAL_DYMO_GetText(Object.s) As "_DYMO_GetText@4"
  23. INTERNAL_DYMO_MRU_GetFileName(Index) As "_DYMO_MRU_GetFileName@4"
  24. EndImport
  25. CompilerCase #PB_Processor_x64
  26. #INTERNAL_DYMO_Import_File = #DYMO_DLL_ImportFile_64bit
  27. Import #INTERNAL_DYMO_Import_File
  28. INTERNAL_DYMO_GetCurrentPrinterName() As "DYMO_GetCurrentPrinterName"
  29. INTERNAL_DYMO_NextPrinter() As "DYMO_NextPrinter"
  30. INTERNAL_DYMO_MRU_NextFile() As "DYMO_MRU_NextFile"
  31. INTERNAL_DYMO_NextObject() As "DYMO_NextObject"
  32. INTERNAL_DYMO_GetText(Object.s) As "DYMO_GetText"
  33. INTERNAL_DYMO_MRU_GetFileName(Index) As "DYMO_MRU_GetFileName"
  34. EndImport
  35. CompilerEndSelect
  36. Enumeration DYMO_Tray
  37. #DYMO_Tray_Unknown = -1
  38. #DYMO_Tray_Left = 0
  39. #DYMO_Tray_Right = 1
  40. #DYMO_Tray_Auto = 2
  41. EndEnumeration
  42. #DYMO_POSTNET_Pos_None = "NONE"
  43. #DYMO_POSTNET_Pos_Top = "TOP"
  44. #DYMO_POSTNET_Pos_Buttom = "BUTTOM"
  45. Import #INTERNAL_DYMO_Import_File
  46. DYMO_Init()
  47. DYMO_Release()
  48. DYMO_ExaminePrinters()
  49. DYMO_SelectPrinter(PrinterName.s)
  50. DYMO_IsTwinTurboPrinter(PrinterName.s)
  51. DYMO_GetCurrentPaperTray()
  52. DYMO_StartPrintJob()
  53. DYMO_StopPrintJob()
  54. DYMO_OpenLabel(File.s, ShowDialogBoxIfFail = #False)
  55. DYMO_SaveLabel(File.s = #Null$)
  56. DYMO_PrintLabel(Copies = 1, ShowDialog = #False, Tray = #DYMO_Tray_Unknown)
  57. DYMO_IsPrinterOnline(PrinterName.s)
  58. DYMO_OpenMemory(*Buffer, BufferSize)
  59. DYMO_SaveMemory()
  60. DYMO_OpenURL(URL.s)
  61. DYMO_MRU_ExamineFiles()
  62. DYMO_MRU_GetFileCount()
  63. DYMO_MRU_OpenFile(Index)
  64. DYMO_SetPrintMode(HighQuality = #True)
  65. DYMO_SmartPasteFromClipboard()
  66. DYMO_SmartPasteFromFile(File.s)
  67. DYMO_SmartPasteFromString(Text.s)
  68. DYMO_ProxySetup(Protocol.s, ServerName.s, Port.l, ProxyBypass.s, UserName.s, Password.s)
  69. DYMO_ProxyClearSettings()
  70. DYMO_ProxyBypass(Set = #True) ; #False = default
  71. DYMO_ExamineObjects(VariableOnly = #True)
  72. DYMO_SetAddress(Address.s, Index = 1)
  73. DYMO_SetField(Object.s, Text.s)
  74. DYMO_GetAddressFieldCount()
  75. DYMO_SetAddressPOSTNET(POSTNET_Pos.s, Index = 1)
  76. DYMO_SetImageFile(Object.s, File.s)
  77. DYMO_SetImageURL(Object.s, URL.s)
  78. DYMO_PasteFromClipboard(Object.s)
  79. DYMO_PasteImageFromClipboard(Object.s)
  80. EndImport
  81. Macro DYMO_GetCurrentPrinterName()
  82. PeekS(INTERNAL_DYMO_GetCurrentPrinterName())
  83. EndMacro
  84. Macro DYMO_NextPrinter()
  85. PeekS(INTERNAL_DYMO_NextPrinter())
  86. EndMacro
  87. Macro DYMO_MRU_NextFile()
  88. PeekS(INTERNAL_DYMO_MRU_NextFile())
  89. EndMacro
  90. Macro DYMO_NextObject()
  91. PeekS(INTERNAL_DYMO_NextObject())
  92. EndMacro
  93. Macro DYMO_GetText(__Object_s__)
  94. PeekS(INTERNAL_DYMO_GetText(__Object_s__))
  95. EndMacro
  96. Macro DYMO_MRU_GetFileName(__Index__)
  97. PeekS(INTERNAL_DYMO_MRU_GetFileName(__Index__)
  98. EndMacro
  99. DisableExplicit
  100. ; CursorPosition = 1
  101. ; Folding = A5
  102. ; EnableXP
  103. ; CompileSourceDirectory
  104. ; EnableCompileCount = 0
  105. ; EnableBuildCount = 0
  106. ; EnableExeConstant

Impressum | Datenschutz