gpt4 book ai didi

c# - 如何找到已排队等待打印的文件位置

转载 作者:太空宇宙 更新时间:2023-11-03 16:25:03 28 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to get the original full file path been printed by Spooler API

try
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2","SELECT * FROM Win32_PrintJob");
}

foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("Document: {0}", queryObj["Document"]);
}

这给出了文件名,我需要文件的位置。

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com