00001 #ifndef __GVWIN_H__
00002 #define __GVWIN_H__
00003
00004
00005
00006
00007 #ifndef STRICT
00008 #define STRICT
00009 #endif
00010 #include <windows.h>
00011 #include <windowsx.h>
00012 #include <stdio.h>
00013 #include <stdlib.h>
00014 #include <string.h>
00015 #include <ctype.h>
00016 #include <time.h>
00017 #include <process.h>
00018
00019
00020 #define MAXSTR 256
00021
00022
00023
00024 extern int gp_printfile(HINSTANCE hInstance,HWND hwnd,char *filename, char *port);
00025
00026 #ifdef __GNUC__XXX
00027
00028 typedef PRINTER_DEFAULTS *LPPRINTER_DEFAULTS;
00029
00030 #define PRINTER_ENUM_DEFAULT 0x00000001
00031 #define PRINTER_ENUM_LOCAL 0x00000002
00032 #define PRINTER_ENUM_CONNECTIONS 0x00000004
00033
00034 #ifndef UNICODE_ONLY
00035 WINBOOL
00036 STDCALL
00037 OpenPrinterA(
00038 LPSTR pPrinterName,
00039 LPHANDLE phPrinter,
00040 LPPRINTER_DEFAULTS pDefault
00041 );
00042 #endif
00043 #ifndef ANSI_ONLY
00044 WINBOOL
00045 STDCALL
00046 OpenPrinterW(
00047 LPWSTR pPrinterName,
00048 LPHANDLE phPrinter,
00049 LPPRINTER_DEFAULTS pDefault
00050 );
00051 #endif
00052 #ifdef UNICODE
00053 #define OpenPrinter OpenPrinterW
00054 #else
00055 #define OpenPrinter OpenPrinterA
00056 #endif // !UNICODE
00057
00058 WINBOOL STDCALL AbortPrinter(HANDLE hPrinter);
00059 WINBOOL STDCALL EndDocPrinter(HANDLE hPrinter);
00060 WINBOOL STDCALL ClosePrinter(HANDLE hPrinter);
00061
00062 WINBOOL STDCALL WritePrinter(
00063 HANDLE hPrinter,
00064 LPVOID pBuf,
00065 DWORD cbBuf,
00066 LPDWORD pcWritten
00067 );
00068
00069
00070 #ifndef UNICODE_ONLY
00071 WINBOOL STDCALL
00072 EnumPrintersA(
00073 DWORD Flags,
00074 LPSTR Name,
00075 DWORD Level,
00076 LPBYTE pPrinterEnum,
00077 DWORD cbBuf,
00078 LPDWORD pcbNeeded,
00079 LPDWORD pcReturned
00080 );
00081 #endif
00082 #ifndef ANSI_ONLY
00083 WINBOOL STDCALL EnumPrintersW(
00084 DWORD Flags,
00085 LPWSTR Name,
00086 DWORD Level,
00087 LPBYTE pPrinterEnum,
00088 DWORD cbBuf,
00089 LPDWORD pcbNeeded,
00090 LPDWORD pcReturned
00091 );
00092 #endif
00093 #ifdef UNICODE
00094 #define EnumPrinters EnumPrintersW
00095 #else
00096 #define EnumPrinters EnumPrintersA
00097 #endif // !UNICODE
00098
00099 #ifndef UNICODE_ONLY
00100 DWORD
00101 STDCALL
00102 StartDocPrinterA(
00103 HANDLE hPrinter,
00104 DWORD Level,
00105 LPBYTE pDocInfo
00106 );
00107 #endif
00108 #ifndef ANSI_ONLY
00109 DWORD
00110 STDCALL
00111 StartDocPrinterW(
00112 HANDLE hPrinter,
00113 DWORD Level,
00114 LPBYTE pDocInfo
00115 );
00116 #endif
00117 #ifdef UNICODE
00118 #define StartDocPrinter StartDocPrinterW
00119 #else
00120 #define StartDocPrinter StartDocPrinterA
00121 #endif // !UNICODE
00122
00123 #endif
00124
00125 #endif
00126