Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Apr : Communicate with USB printer

www.cryer.info
Managed Newsgroup Archive

Communicate with USB printer

Subject:Communicate with USB printer
Posted by:"Frédéric SCHENCKEL" (f.schenck..@cab-technologies.fr)
Date:Thu, 13 Apr 2006 12:32:52 +0200

Hello,


I read that I can communicate with a USB printer using CreateFile.
But the problem is what to give as parameter for the filename ?

I tried several things but at this time nothing works :

   FileHandle := CreateFile(PChar(PortName),
                            GENERIC_READ or GENERIC_WRITE,
                            0,
                            nil,
                            OPEN_EXISTING,
                            0,
                            0);

I tried the printername, the port name ('USB002' and '\USB002')

What can I try else ?

Thanks

Regards

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive