Reply to Re: COM Objects

Your name:

Reply:


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

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация