资源简介
虚拟打印机 驱动 源码 DDK
直接可用的,新手必看.
代码片段和文件信息
/*
Monitor.cpp
Project Full Name: imageprinter
http://sourceforge.net/projects/imageprinter/
http://code-industry.net
Copyright (C) 2007-2008 Ibadov Tariel
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#define MONITOR_EXPORTS
#include
#include
#include “PortList.h“
#include “Monitor.h“
#include “rpcl.h“
#include “p2jpg.h“
#include “utils.h“
#define szLocalMonitor _T(“ImagePrinter Port“)
HINSTANCE hInst=NULL;
HINSTANCE hSpoolssDll=NULL;
CRITICAL_SECTION SpoolerSection;
HANDLE m_hEvent=NULL;
CPortList *m_portlist=NULL;
TCHAR *m_sRegistryRoot=NULL;
bool default_ext_app;
bool select_ext_app;
extern long PageNo;
string NamePrintFile;
string NameTempFile;
TCHAR tempfilename[MAX_PATH];
TCHAR image_name[MAX_PATH];
bool onefile=false;
int qjpg=100;
bool multipage_tiff=false;
typedef BOOL (WINAPI *fpENUMPORTS)
(
LPWSTR pName
DWORD Level
LPBYTE pPorts
DWORD cbBuf
LPDWORD pcbNeeded
LPDWORD pcReturned
);
BOOL APIENTRY DllMain(HINSTANCE hModule DWORD dwReason LPVOID lpRes)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
hInst = hModule;
InitializeCriticalSection(&SpoolerSection);
DisableThreadLibraryCalls((HINSTANCE)hModule);
m_portlist=new CPortList();
return TRUE;
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
if(m_hEvent)
CloseHandle(m_hEvent);
if(m_sRegistryRoot)
free((void*)m_sRegistryRoot);
if(hSpoolssDll)
FreeLibrary(hSpoolssDll);
delete m_portlist;
return TRUE;
}
UNREFERENCED_PARAMETER( lpRes );
return TRUE;
}
void EnterCritSection()
{
EnterCriticalSection(&SpoolerSection);
}
void LeaveCritSection()
{
LeaveCriticalSection(&SpoolerSection);
}
BOOL WINAPI iEnumPorts(LPWSTR pNameDWORD dwLevelLPBYTE pPortsDWORD cbBufLPDWORD pdwNeededLPDWORD pdwReturned)
{
EnterCritSection();
BOOL bResult = m_portlist->EnumPorts(pNamedwLevelpPortscbBufpdwNeededpdwReturned);
LeaveCritSection();
return bResult;
}
BOOL WINAPI iOpenPortEx(LPWSTR pNameLPWSTR pPrinterNamePHANDLE pHandle struct _MONITOR *pMonitor)
{
EnterCritSection();
PORT *pPort=m_portlist->FindPort(pName);
*pHandle=(HANDLE)pPort;
pPort->dwStatus |= PS_OPENED;
LeaveCritSection();
return pPort!=NULL;
}
BOOL WINAPI iOpenPor
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 115 2008-11-05 17:49 imgport\clear.bat
文件 195 2008-12-19 13:18 imgport\clear_all.bat
文件 26343 2009-03-26 17:00 imgport\imgport.dev
文件 806 2009-03-26 17:00 imgport\imgport_private.h
文件 991 2009-03-26 17:00 imgport\imgport_private.rc
文件 424 2009-03-23 18:48 imgport\imgprint.rc
文件 525 2009-03-30 21:30 imgport\install\HISTORY.TXT
文件 1308377 2009-03-26 19:55 imgport\install\i386\imgport.dll
文件 13261 2007-06-13 12:29 imgport\install\i386\imgprint.gpd
文件 595968 2009-03-26 19:20 imgport\install\i386\Options.exe
文件 13424 2008-11-05 17:49 imgport\install\i386\stdnames.gpd
文件 651 2009-01-30 18:39 imgport\install\imgprinter.inf
文件 6622 2009-03-26 19:53 imgport\install\setup.nsi
文件 23008 2008-11-05 17:49 imgport\jpg\ansi2knr.c
文件 5381 2008-11-05 17:49 imgport\jpg\cderror.h
文件 4863 2008-11-05 17:49 imgport\jpg\cdjpeg.c
文件 6307 2008-11-05 17:49 imgport\jpg\cdjpeg.h
文件 9401 2008-11-05 17:49 imgport\jpg\jcapimin.c
文件 6042 2008-11-05 17:49 imgport\jpg\jcapistd.c
文件 16849 2008-11-05 17:49 imgport\jpg\jccoefct.c
文件 15362 2008-11-05 17:49 imgport\jpg\jccolor.c
文件 12866 2008-11-05 17:49 imgport\jpg\jcdctmgr.c
文件 29161 2008-11-05 17:49 imgport\jpg\jchuff.c
文件 1622 2008-11-05 17:49 imgport\jpg\jchuff.h
文件 2421 2008-11-05 17:49 imgport\jpg\jcinit.c
文件 9557 2008-11-05 17:49 imgport\jpg\jcmainct.c
文件 17909 2008-11-05 17:49 imgport\jpg\jcmarker.c
文件 20479 2008-11-05 17:49 imgport\jpg\jcmaster.c
文件 3216 2008-11-05 17:49 imgport\jpg\jcomapi.c
文件 2787 2008-11-05 17:49 imgport\jpg\jconfig.h
............此处省略192个文件信息
- 上一篇:ADS仿真论文集(完美)+.pdf
- 下一篇:imagej 源码
相关资源
- imagej 源码
- 一套完整的企业网站源码,带后台
- win7 VCP虚拟串口驱动安装
- px4飞控源码
- U-EC5 Keil调试驱动
- qt webService Client源码
- HideProcX64_V1源码
- stm32驾校考试系统源码
- wince 嵌入式高级编程
- 基于STM32的安卓蓝牙遥控车程序源码
- FPS2800B12C4流体特性传感器驱动程序
- 基于easyui的文档管理系统springmvc+myb
- STM32使用cubemx和HAL库驱动ICM20602
- THB6128步进电机驱动电路
- ftp服务器源码
- 五子棋局域网对战 项目源码
- Qt 视频播放源码
- 基于FPGA用VHDL语言设计的四位共阴数码
- FAQ管理全源代码源码整理
- 系统程序员成长计划-源码
- 最新最全的FLEX++网站源码
- v4l2中文手册(规范)全五章(包含驱
- 宏狗加密狗驱动程序GrandDogRunTimeSyst
- Pixy源码及HSV移植
- servlet用户注册源码
- 基于战舰STM32的1602液晶驱动程序+ds1
- TI杯电子设计大赛LDC1000STM32驱动
- VC编写的计算机联锁源码
- 机房管理系统源码
- 寒江独钓 光盘 代码
评论
共有 条评论