|
Posted by Steve on 04/24/07 21:32
"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).
if you still want/need the ocx, you can create a dll that contains a
form...just plop the ocx on the form and wrap it's interfaces publically.
then COM that from php.
hth,
me
Navigation:
[Reply to this message]
|