Compartilhar via


Printing on a Network (Windows CE 5.0)

Send Feedback

Once you have the name of a printer, to print on a network use the CopyFile function or the CreateFile and WriteFile functions.

To print using CopyFile

  1. Call CopyFile, specifying the network printer to use and which file to print.

  2. CopyFile has the following syntax.

    CopyFile (szSrcFile, szUNCPrinterShare, FALSE);
    
  3. The file to print is szSrcFile. The network printer to use is szUNCPrinterShare, which can accept a UNC name returned by the WNetEnumResource function.

To print using CreateFile and Writefile

  1. Create a file on the network printer by calling CreateFile.
  2. Write the data or document to be printed to the newly created file by calling the WriteFile function.
  3. Close the file to queue the print job.

See Also

Windows Networking API/Redirector Application Development | Managing Network Connections with WNet

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.