View Single Post
  #3 (permalink)  
Old 09-09-2010, 11:54 PM
Stuart McCall
Guest
 
Posts: n/a
Default Re: HyperTerminal Control

"The Frog" <mr.frog.to.you@googlemail.com> wrote in message
news:121ffef3-d18d-46a4-9407-e1b96e91f59a@c16g2000vbp.googlegroups.com...
> Hi again Lou,
>
> Did a little digging for you and came up with this:
>
> 1/ Here is a VB / VBA module that allows you to directly control a
> serial port:
> http://www.thescarms.com/vbasic/CommIO.aspx
>
> Pretty neat!
>
> 2/ Here is an example on using it with external hardware devices:
>
> http://www.pencomdesign.com/support/...xample_api.htm
>
> Also pretty neat!
>
> That should basically give you everything you need to DIY this one
> yourself. The practical example is great for this code. I imagine you
> could have this up and running pretty quickly. Using the Windows API
> stuff is also IMO far more stable than relying on the Comm32.ocx
> ActiveX control, and it is definitely more portable as it doesnt rely
> on anything else being installed to get the job done. The link to code
> in step 1 above provides you with all the API code already written and
> nicely wrapped up in VBA friendly commands and functions - all the
> hard work is done!
>
> I hope this helps
>
> Cheers
>
> The Frog


I downloaded the CommIO project. V interesting, thanks for posting. However,
I think I've spotted a wee mistake in the CommOpen routine. About halfway
down, there are two lines:

.WriteTotalTimeoutMultiplier = 0
.WriteTotalTimeoutMultiplier = 1000

I believe those should read:

.WriteTotalTimeoutMultiplier = 0
.WriteTotalTimeoutConstant = 1000

How much that will affect outcomes I dunno <shrug>, not having tested it
yet.


Reply With Quote