|
Posted by Steve on 04/25/07 13:12
"Steve" <no.one@example.com> wrote in message
news:AFuXh.1676$OR3.1610@newsfe04.lga...
|
| "Rιmy Sanchez" <thenux@gmail.com> wrote in message
| news:1177446592.987028.210940@n35g2000prd.googlegroups.com...
| Hello,
| I'm trying to use MSCOMM32.OCX, but I got an error "Fatal error:
| Uncaught exception 'com_exception' wih message 'Failed to create COM
| object 'MSComm32.OCX' : Incorrect syntax'
|
| The OCX is present on the system and I could succesfully use it
| through visual basic. Any clue ?
|
| ==============
|
| what does your code look like?
|
| oh, just noticed...you're using an ocx. you need to use a dll. ocx's
require
| containers for instanciation...i.e. a window. i don't think you can call
| window api's directly from php in order to create a window and then
| co-create the ocx for that window.
|
| if you aren't doing anything dramatic with your port communications, you
can
| just use php's built-in file i/o. iirc, your path would be:
|
| '//COM1' (or whatever port you were wanting to use).
brrrrr!!!
there are two 'correct' path nomanclatures. first:
'COM1'
however on windows, this will only allow you to communicate with up to 8 com
ports. this:
'\\.\COM1'
removes the limitation. i found some code i'd written some time back where i
thought i'd done some com port work. that's what i've gotten so far. i think
i built a com port dll with vb once...which is what i'm looking for now.
the great thing about archiving some of your previous work is that you'll
always have it to go back to. the bad thing is that it gets pretty large
after so many years. :)
Navigation:
[Reply to this message]
|