Board index » cppbuilder » BDS2006, using Comm32.ocx, error

BDS2006, using Comm32.ocx, error


2006-07-04 06:32:04 PM
cppbuilder95
Hello,
I managed to create a package and add the Comm32.ocx into the package.
Now I put the Comm32 object (called 'MSComm1') on my Form1.
I can init the comm32 which does not generate any compile/run error.
But if I want to send data to the comport by:
MSComm1->Output="Hello world";
then at runtime an exeption is raised saying:
EOleException 'Invalid property value'.
Anybody can help?
Regards,
Henk
 
 

Re:BDS2006, using Comm32.ocx, error

Hello,
I found the solution:
The property must be a Variant.
Variant src;
src="Hello world";
MSComm1->Output=src;
thanks for listening anyway...;-)
Henk
"Henk van Winkoop" < XXXX@XXXXX.COM >schreef in bericht
Quote
Hello,

I managed to create a package and add the Comm32.ocx into the package.

Now I put the Comm32 object (called 'MSComm1') on my Form1.

I can init the comm32 which does not generate any compile/run error.

But if I want to send data to the comport by:

MSComm1->Output="Hello world";

then at runtime an exeption is raised saying:

EOleException 'Invalid property value'.

Anybody can help?

Regards,

Henk