- UID
- 170345
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-8-30
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
在打印的API有一个Setjob,我查Msdn,只有关于C++的
typedef
typedef struct _JOB_INFO_2 { // ji2
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pNotifyName;
LPTSTR pDatatype;
LPTSTR pPrintProcessor;
LPTSTR pParameters;
LPTSTR pDriverName;
LPDEVMODE pDevMode;
LPTSTR pStatus;
PSECURITY_DESCRIPTOR pSecurityDescriptor;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD StartTime;
DWORD UntilTime;
DWORD TotalPages;
DWORD Size;
SYSTEMTIME Submitted;
DWORD Time;
DWORD PagesPrinted ;
} JOB_INFO_2;
typedef struct _JOB_INFO_1 { // ji1
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pDatatype;
LPTSTR pStatus;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD TotalPages;
DWORD PagesPrinted;
SYSTEMTIME Submitted;
} JOB_INFO_1;
但是我看到网上一个VB的ADDJOB_INFO_1
Type ADDJOB_INFO_1 ' 8 Bytes
lpPath As Long
JobId As Long
End Type
也找不到JOB_INFO_1
然后自己准备照着改一个
Type JOB_INFO_1
LONG JobId 'DWORD JobId;
String pPrinterName 'LPTSTR pPrinterName;
String pMachineName 'LPTSTR pMachineName;
String pUserName 'LPTSTR pUserName;
String pDatatype 'LPTSTR pDocument;
String pDatatype 'LPTSTR pDatatype;
String pStatus 'LPTSTR pStatus;
LONG Status 'DWORD Status;
LONG Priority 'DWORD Priority;
LONG Position 'DWORD Position;
LONG TotalPages 'DWORD TotalPages;
LONG PagesPrinted 'DWORD PagesPrinted;
SYSTEMTIME Submitted
End Type
Type SYSTEMTIME ' 16 Bytes
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
不知道是否可行,还有就是EnumJobs 和 GetJob ,setjob 的用法不是很清楚.
我的原意是将"Sever//print1"里面的job先列出来,自动找出属于我自己的,再把我的job的优先级调为2(我有这个权限,双击打印机后可以手动调job的优先级).
请高手门出点意见,最好是给出类似的代码给我参考一下. |
|