请教关于win95 API 中ENumPrinters()的调用(100分)

  • 主题发起人 主题发起人 espite
  • 开始时间 开始时间
E

espite

Unregistered / Unconfirmed
GUEST, unregistred user!
请教其中的各参数的说明情况,有例子更好。<br>先行谢过。
 
? So Easy? I can copy answer from VC Help, :)<br><br>The EnumPrinters function enumerates available printers, print servers, domains, or print providers. <br><br>BOOL EnumPrinters( <br>DWORD Flags, // types of printer objects to enumerate <br>LPTSTR Name, // name of printer object <br>DWORD Level, // specifies type of printer info structure <br>LPBYTE pPrinterEnum, // pointer to buffer to receive printer info structures<br>DWORD cbBuf, // size, in bytes, of array <br>LPDWORD pcbNeeded, // pointer to variable with no. of bytes copied (or required) <br>LPDWORD pcReturned // pointer to variable with no. of printer info. structures copied <br>);<br><br>Really too verbosely, I you want detailed information, I can mail you the help pages of this API, OK?
 
I know this in Delphi Help.<br>I just wanna a chinese explaination.<br>Can you hekp me?
 
I know this in Delphi help,<br>and I just wanna a chinese explaination.<br>Can you help me?<br>Thank you.
 
这个API的用法说明真是冗长!<br>我简单说明一下<br>这个API用于了解可用的打印机的信息<br>参数的意义是:<br>Flags:<br>可以是PRINTER_ENUM_LOCAL, PRINTER_ENUM_NAME, PRINTER_ENUM_SHARED, PRINTER_ENUM_DEFAULT, <br>PRINTER_ENUM_CONNECTIONS等或者某些合法的组合<br><br>Name:<br>与Flag相关的名字, 例如, 服务器名, 域名等<br><br>Level:<br>您希望返回的结构类型, 95可以用1, 2, 5, NT可以用1, 2, 4, 5<br>分别代表<br>PRINTER_INFO_1,<br>PRINTER_INFO_2,<br>PRINTER_INFO_4,<br>PRINTER_INFO_5<br>各个结构的不同点是返回信息的详尽程度或者用途不同<br><br>pPrinterEnum:<br>您提供的一个接受返回结果的缓冲区<br><br>cbBuf:<br>这个缓冲区的大小(in Bytes)<br><br>pcbNeeded:<br>您提供的空间, API调用返回时, 将告诉您用了pPrinterEnum多少字节(成功时), 或者需要多少字节(如果空间不够)<br><br>pcReturned:<br>您提供的空间, API调用返回时, 将告诉您到底返回了多少个level中要求的结构<br><br>EnumPrinters返回非零值表示调用成功.<br><br>**************************************************<br>通过我上面的介绍, 您只能对这个API如何用有一点概念, 真要使用还是必须看英文的VC联机文档, 如果您要我可以把相关的<br>文档寄去<br>
 
Thank you!But the information that you give me is <br>what I can get in Delphi help.I need some detail<br>information in Chinese.As to the document of ENum-<br>Printers I can get it in Delphi too.<br>Thank you again.
 
But I think the English version of VC document on EnumPrinters is well, you can read it carefully. They are simple English indeed!<br>If you really want a Chinese version, I can translate it and then make an example app to demo it. But you must wait for some time. I'm not<br>free this and next week, :(.
 
哈哈! espite啊, pegasus被你气歪啦 ...
 
后退
顶部