如何查找和读取网络打印机的假脱机文件(* .SPL)

时间:2019-02-15 10:46:45

标签: winapi language-agnostic

我知道如何查找和读取本地打印机的假脱机文件,但是我不知道如何查找和读取网络假脱机文件。我该怎么做?

下面是我现在所拥有的:

//I get all available printers using
EnumPrinters(flags, NULL, 2, (LPBYTE)prninfo, needed, &needed, &returned)

//then create a new Printer Change notification thread using
    hThread = (HANDLE)_beginthreadex(NULL,
                    0,
                    NotificationUpdate,
                    (void *)hParam,
                    1,
                    &ThreadID);
    return hThread;

//then when I receive notification messages like
switch(PRINTER_NOTIFY_INFO_DATA) {
  case JOB_NOTIFY_FIELD_DEVMODE :
  case JOB_NOTIFY_FIELD_STATUS:

//I'm able to get print JobID and look in the windows folder for SPL files with that ID

GetSystemDirectoryW(wszSpoolDirectory, MAX_PATH);
wszSpoolDirectory = windows System32 folder + \spool\PRINTERS\?????+JobID.SPL

我也尝试使用GetSpoolFileHandle(hPrinter)函数,但这返回INVALID_HANDLE_VALUE

我不知道如何从局域网打印机获取带有* .SPL扩展名的假脱机文件

如何查找和读取仅通过LAN端口与路由器连接的网络打印机的SPL文件?

0 个答案:

没有答案