LPT1 print from Windows Service

G

Gonçalo Boléo

Hi!

I'm trying to develop a print mechanism each time a file is placed in a
certain folder.
I'm using a Windows Service and FileSystemWatcher class to implement this.

Printing to LPT1 port is doing using unmanaged function CreateFile as
described in MSDN.
My code works fine in a console application but in a Windows Service
(running with my credentials) when i call CreateFile i got the following
error: "The system cannot find the file specified".



Can anyone help me?

Thanks,
Gonçalo Boléo
 
G

Gonçalo Boléo

Problem solved.
I'm so stupid!

Accessing printer by it's share name works equally.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top