[delphizip] Re: OT: USB VCL Component for Delphi7

  • From: James Turner <james.d.h.turner@xxxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Mon, 27 Sep 2010 14:39:17 +0100

USB is much more complex than RS232, most notably, multiple devices can 
be plugged into a single USB port. Essentially, you're approach to the 
problem is wrong - you need to forget about USB and concentrate on 
talking to the printer as if it's attached via a black box.

If a simple hardware solution is no good (i.e. a USB-RS232 converter) 
then I suggest you look for technical support from the printer 
manufacturer. If they are good enough to provide details on the 
programming language, I would expect them to provide instructions on how 
to access the printer directly. In any case, talking directly to the USB 
interface is more or less a non-starter.

I have never studied how USB printers work, however, *IF* your printer 
adds a virtual serial port (or parallel port) you may be able to talk to 
that. You should be able to check this via the device manager.

-- James Turner



Ivano Luberti wrote:
> Thanks for responding James: you made me realize my question was not
> well phrased.
>
> Yes I need to do something low-level, because I need, like I'm already
> doing now to use the printer programming language.
> Actually I'm using the RS232 port to do the same thing, through
> TurboPower Async Professional (APRO).
> I was looking for something similar but dedicated to the USB interface
> instead of the serial port interface.
>
> I have already googled before posting here, without much success.
> Can someone help now that I have been more precise?
> Even the link to the good forums cited by James could be useful.
>
> Il 27/09/2010 13.49, James Turner ha scritto:
>   
>> Printers print - that's all they do, so, assuming you want to print 
>> something, use the tools that are built into Delphi.
>>
>> If you really need to go low-level for some reason, you're talking about 
>> either writing a device driver (very tricky with Delphi but maybe not 
>> impossible for 32bit systems) or communicating with an existing driver 
>> directly using a Windows API function such as DeviceIOControl. If you 
>> are trying to do something sensible, you may find someone has written 
>> the necessary code already.
>>
>> There are a number of Delphi forums out there, so I suggest you pick one 
>> or two.
>>
>> -- James Turner
>>
>>
>> Ivano Luberti wrote:
>>   
>>     
>>> Hello all, I understand this is an OT message but I hope somebody can
>>> give me a good pointer.
>>>
>>> I need to implement a direct communication with a printer using a USB port.
>>> For budger reasons I'm stuck with Delphi7 as the dev environment.
>>> Can someone point me to some documentation and libraries to implement
>>> such a thing?
>>>
>>>   
>>>     
>>>       
>> -----------
>> To unsubscribe from this list, send an empty e-mail 
>> message to:
>>   delphizip-request@xxxxxxxxxxxxx 
>> and put the word unsubscribe in the subject.
>>
>>   
>>     
>
>   
-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: