1. Judy Shiels
  2. PowerBuilder
  3. Wednesday, 19 July 2023 20:56 PM UTC

I am trying to migrate an application from powerbuilder 7.0  LOL

 

We used the mscomm32.ocx to communicate with a PLC via the Serial Port.

The client isn't looking to make any major changes (like communicate via TCP)

I have registered the OCX and can select it when I choose insert control/ole. 

But then I get the error Insertion of OLE object failed.  license file required.  I don't understand this.  Microsoft doesn't require a license to use this control that I know of.

Thanks

Judy

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 20 July 2023 17:53 PM UTC
  2. PowerBuilder
  3. # 1

Hi Judy;

  BTW: According to Microsoft, you should still be able to use that OCX ...

FYI: https://answers.microsoft.com/en-us/windows/forum/all/missing-file-mscomm32ocx/996447c3-3c1d-4d81-ac58-aa8284c5ed82

HTH

Comment
  1. Judy Shiels
  2. Thursday, 20 July 2023 18:28 PM UTC
Yes you can still use the "runtime" version. We are currently running the PB7 version with the runtime in Windows 10



We are looking to migrate to the latest PB version and make changes - the issue is you can't use the active x in Design mode so can compile or make changes to the comm active x.

  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 20 July 2023 20:06 PM UTC
I wonder if the PB IDE does not see it in design mode because the registry entries are not there?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2023 21:35 PM UTC
  2. PowerBuilder
  3. # 2

Hi Judy;

  Yes, the "mscomm32" OCX object is now long gone O/S compatibility / support wise.

  You can try & use the FileOpen() command though instead. That might work well for your use ...

https://community.appeon.com/index.php/qna/q-a/read-data-from-a-port

HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 19 July 2023 23:16 PM UTC
Once the COM Port is open via the FileOpen() command, you can use the FileWrite() command to send command codes to the COM Port to configure it. Then use the FileRead() command to process the ports data.

Regards ... Chris
  1. Helpful
  1. Judy Shiels
  2. Thursday, 20 July 2023 17:29 PM UTC
Interesting idea ... a couple of things.



The active x has a oncomm event that is triggered when there is data. I don't think this method would handle this.



Second, do you have any reference on what the command codes are?



I think I am going to look around for a 3rd party Serial Port ActiveX



Thanks



Judy
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 20 July 2023 17:52 PM UTC
No, you would need the device's documentation for those command codes. They are normally handled via escape codes sent by your PB App.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.