vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
vb@rchiv Offline-Reader - exklusiv auf der vb@rchiv CD Vol.4  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB & Windows API
Hier jetzt das Modul  
Autor: Ralf Schoen
Datum: 28.01.04 12:08

Option Explicit
Public Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" ( _
  ByVal pPrinterName As String, phPrinter As Long, pDefault As Any) As Long
Public Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As _
Long) As Long
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination _
As Any, Source As Any, ByVal Length As Long)
 
Public Declare Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" ( _
  ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Any, ByVal Command _
  As Long) As Long
Public Declare Function GetPrinter Lib "winspool.drv" Alias "GetPrinterA" ( _
ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Any, ByVal cbBuf As _
Long, pcbNeeded As Long) As Long
 
' Print qualities
Public Const DMRES_DRAFT = (-1)
Public Const DMRES_LOW = (-2)
Public Const DMRES_MEDIUM = (-3)
Public Const DMRES_HIGH = (-4)
 
 
Public Type devMode
   dmDeviceName As String * 32
   dmSpecVersion As Integer
   dmDriverVersion As Integer
   dmSize As Integer
   dmDriverExtra As Integer
   dmFields As Long
   dmOrientation As Integer
   dmPaperSize As Integer
   dmPaperLength As Integer
   dmPaperWidth As Integer
   dmScale As Integer
   dmCopies As Integer
   dmDefaultSource As Integer
   dmPrintQuality As Integer
   dmColor As Integer
   dmDuplex As Integer
   dmYResolution As Integer
   dmTTOption As Integer
   dmCollate As Integer
   dmFormName As String * 32
   dmUnusedPadding As Integer
   dmBitsPerPel As Integer
   dmPelsWidth As Long
   dmPelsHeight As Long
   dmDisplayFlags As Long
   dmDisplayFrequency As Long
End Type
 
' struktur um die Daten sichtbar zu machen ' look and feel ;-)
Public Type PrinterInfo2
   pServerName As String
   pPrinterName As String
   pShareName As String
   pPortName As String
   pDriverName As String
   pComment As String
   pLocation As String
   pDevMode As Long 'DEVMODE
   pSepFile As String
   pPrintProcessor As String
   pDatatype As String
   pParameters As String
   pSecurityDescriptor As Long 'SECURITY_DESCRIPTOR
   Attributes As Long
   Priority As Long
   DefaultPriority As Long
   StartTime As Long
   UntilTime As Long
   Status As Long
   cJobs As Long
   AveragePPM As Long
End Type
 
' Struktur um die daten von Windows zu holen
Public Type PRINTER_INFO_2
   pServerName As Long
   pPrinterName As Long
   pShareName As Long
   pPortName As Long
   pDriverName As Long
   pComment As Long
   pLocation As Long
   pDevMode As Long 'DEVMODE
   pSepFile As Long
   pPrintProcessor As Long
   pDatatype As Long
   pParameters As Long
   pSecurityDescriptor As Long 'SECURITY_DESCRIPTOR
   Attributes As Long
   Priority As Long
   DefaultPriority As Long
   StartTime As Long
   UntilTime As Long
   Status As Long
   cJobs As Long
   AveragePPM As Long
End Type
 
Public Const PRINTER_ACCESS_ADMINISTRATOR = &H4  'Nur Administartor zugriff
Public Const PRINTER_ACCESS_USE = &H8  'Standard zugriff, nur Drucken
Public Const PRINTER_ALL_ACCESS = &HF000C  'Voller zugriff zur Synchronisation
 
Public Type PRINTER_DEFAULTS
   pDatatype As String
   pDevMode As devMode
   DesiredAccess As Long
End Type
 
Public m_pi2 As PrinterInfo2

Gru?

Ralf

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
SpecialFolderLocation2.844GuidoE24.01.04 22:56
Re: SpecialFolderLocation1.923ModeratorMartoeng24.01.04 23:07
Re: SpecialFolderLocation1.793GuidoE24.01.04 23:25
Re: SpecialFolderLocation1.765ModeratorMartoeng24.01.04 23:47
Re: SpecialFolderLocation1.888GuidoE25.01.04 01:56
Re: SpecialFolderLocation1.752zillertaler25.01.04 10:05
Re: SpecialFolderLocation1.848zillertaler25.01.04 10:16
Re: SpecialFolderLocation1.667GuidoE25.01.04 21:13
Re: SpecialFolderLocation1.689zillertaler26.01.04 10:38
Re: SpecialFolderLocation1.768GuidoE26.01.04 18:40
Re: SpecialFolderLocation1.762Mr. Fox26.01.04 20:18
Re: SpecialFolderLocation1.713GuidoE26.01.04 23:43
Re: SpecialFolderLocation1.596Mr. Fox27.01.04 00:38
Re: SpecialFolderLocation1.811GuidoE27.01.04 05:31
Re: SpecialFolderLocation2.055Ralf Schoen28.01.04 12:08
Hier jetzt das Modul 2.248Ralf Schoen28.01.04 12:08
Re: Hier jetzt das Modul 1.749GuidoE28.01.04 19:31
Re: SpecialFolderLocation1.514SirTurner03.03.05 18:39
Re: SpecialFolderLocation1.609Guido Eisenbeis04.03.05 01:54

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2024 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel