『楼 主』:
我需要对ACAD的PLT文件进行打印,如何获得网络打印机位置?
使用 LLM 解释/回答一下
比较有难度吧,涉及网络、编程、DOS、Windows,望高手多多指点啊……
网络状况:
局域网内,有一台数据服务器,其上有一台hp打印机,网络内还有一台打印机(该打印机有ip地址,网线直接接在上面)。
我的流程:
使用VC,给用户一个界面,让用户选择打印的plt文件,我获得该路径
首先将数据服务器的文件夹映射到本地z:
net use z: \\server\data
然后copy z:\*.plt \\计算机名\打印机名
问题:
1。我须在DOS下键入 copy *.plt \\计算机名\打印机名
可是怎么能够让用户在windows下不用理会这个(因为hp打印机在控制面板里为默认打印机),而我的程序知道打印机的位置呢(\\计算机名\打印机名)?可以做到么?
或者这样:给用户一个界面选择打印机,从中获得打印机地址。该怎么写啊……
2。对于有ip地址的网络打印机(不知道该怎么称呼,该打印机直接接入网络,有ip地址),我该怎么打印plt文件?copy *.plt \\计算机名 这种方法可行么?又如何获得该IP地址呢……
It's quite challenging, involving network, programming, DOS, Windows, hope experts can give more guidance...
Network situation:
Within the local area network, there is a data server, on which there is an HP printer, and there is another printer in the network (this printer has an IP address, and the network cable is directly connected to it).
My process:
Use VC to give the user an interface, let the user select the plt file to be printed, and I get the path.
First map the folder of the data server to the local z:
net use z: \\server\data
Then copy z:\*.plt \\computer name\printer name
Problem:
1. I need to type copy *.plt \\computer name\printer name under DOS. But how can I make the user not care about this under Windows (because the HP printer is the default printer in the control panel), and how does my program know the location of the printer (\\computer name\printer name)? Can this be done?
Or like this: give the user an interface to select the printer, and get the printer address from it. How to write this...
2. For the network printer with an IP address (don't know how to call it, this printer is directly connected to the network and has an IP address), how should I print the plt file? Is the method of copy *.plt \\computer name feasible? And how to get this IP address...
|