1. Jean-Charles Fauchier
  2. PowerBuilder
  3. Wednesday, 20 October 2021 07:41 AM UTC

Hello community,


Do you think it's possible to use mscomm32.ocx when compiling Powerbuilder executable in 64 bits ?

For me it works fine when I compile in 32 bits but not in 64 bits. I get "error accessing external object properties" with the same source code.


Any idea ?

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 20 October 2021 14:23 PM UTC
  2. PowerBuilder
  3. # 1

Unless you have a separate, 64-bit compatible version of mscomm32.ocx, you're going to be restricted to using the version you have in a 32-bit application, because that's the architecture the ocx was created for.

Look at sysmon.ocx, for example. On my Win10 machine, the 32-bit version of this ocx resides in the C:/Windows/SysWOW64 folder and it's size is 337,408 bytes. The 64-bit version resides in the C:/Windows/System32 folder and its size is 423,936 bytes. Two versions for the two architectures.

I suspect there might not be a 64-bit version of this particular ocx, so you'll probably have to find a different means of accessing COM ports in a 64-bit application.

  1. Chris Pollach @Appeon
  2. Thursday, 29 February 2024 16:10 PM UTC
Hi John ... Correct - MS never created a 64 bit version of this old FoxPro DLL

@Jean-Charles - https://stackoverflow.com/questions/836368/is-there-a-64-bit-version-of-microsoft-common-controls-mscomctl-ocx

Alternative ....

A serial port or USB device can be read or written to using the FileOpen ( ) method. For example ...

integer li_FileNum

li_FileNum = FileOpen ( "COM1:", LineMode!, Write!, LockWrite!, Replace!)

FileRead / FileWrite ...

Note: Just replace COM1: with the device name / port that you need to access


Regards ... Chris
  1. Helpful
There are no comments made yet.
Jean-Charles Fauchier Accepted Answer Pending Moderation
  1. Wednesday, 20 October 2021 13:46 PM UTC
  2. PowerBuilder
  3. # 2

Hi John,


I use mscomm32 ocx in my powerbuilder (2019 or 2021) applications and it runs fine on Windows  7, 8, 10. (32 or 64 bits OS)

But it works only when I compile my app's in 32-bits . It doesn't work when I compile my app's in 64-bits ( see code generation option platform in PB Projet)




There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 20 October 2021 13:26 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Jean-Charles -

You neglected to say what O/S version(s) you are using... I'm assuming Windows 10?

Since mscomm32.ocx is not distributed with Windows 10, I'm guessing this OCX is old and you are attempting to utilize its functionality in an operating environment it was never designed for.

A quick web search showed results that are not promising. Here is one discussion thread from MSDN:


Perhaps if you submit another question that explains what you are needing to do, someone in the community may have suggestions or recommendations. If so, please include mention of PB product version(s) and O/S version(s).

Regards. John

  1. Jean-Charles Fauchier
  2. Thursday, 29 February 2024 09:11 AM UTC
Hello John

mscomm32.ocx works fine with Windows 10 (64 bits)

The problem is when using mscomm32.ocx with a powerbuilder application compiled in 64 bits.

I'm looking for a new version of mscomm which is compatible with 64 bits applications and that we can integrate in our powerbuilder development as an ocx.
  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.