Could you point how to deal with this mscomdlg.commondialog error when running VFP?

Hi Experts

Could you point how to deal with this mscomdlg.commondialog error when running VFP?

img001
I guess it's a matter of an .OCX install

I had installed comdlg32.ocx and mscomm32.ocx


And configured as:

img002
Any other is necessary?

Thanks in advance!
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
MSComDlg.CommonDialog is a part of comdlg32.ocx and this control has to be installed in SysWOW64 folder and registered by Regsvr32 from the same folder.

If you did everything this then please post the error which appears when CREATEOBJECT is issued in the Command Window.
Olaf DoschkeSoftware DeveloperCommented:
Again, you could make use of dependency walker.

mscomm32.ocx is about COM Ports, totally unrelated and unnecessary.

Not sure if comdlg32ocx is the right ocx, Could very well be right. If it is, did you put it in SysWow64?

After putting the OCX there, start cmd.exe elevated (Window title Caption must show "Administrator:..."), then CD into C:\Windows\SysWow64 and then regsvr32 cmdlg32.ocx (or other OCX files). It must be 32bit OCX files, too.

Bye, Olaf.
pcelbaCommented:
MSComDlg.CommonDialog requires MSVCRT.DLL.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Eduardo FuerteDeveloper and AnalystAuthor Commented:
Hi

I agree with:

MSComDlg.CommonDialog is a part of comdlg32.ocx and this control has to be installed in SysWOW64 folder and registered by Regsvr32 from the same folder.

Evidence:
If I unregister comdlg32.ocx:
c:\Windows\SysWoW64\Regsvr32 /u comdlg32.ocx

The error of the 1st picture(question) arises

But then, if I register the .ocx at the .exe folder
Regsvr32 c:\pesesp\comdlg32.ocx

Everything runs OK... again,  but on my PC.

The error I get at the user's machine (question picture)  was: 1426 (Active-X Error 1426 : Library Not Registered)

At the user's PC I registered it in the .exe folder too- instead of these options (32/ 64 bits OS):

REGSVR32  C:\Windows\System32\comdlg32.ocx

c:\Windows\SysWoW64\Regsvr32 comdlg32.ocx

I will ask to install and register in the correspondent OS Windows folder to check if the problem will be solved that maner.

The dependency waker:
img005
Olaf DoschkeSoftware DeveloperCommented:
Common dialogs is so system heavy, that I won't install it in the application directory. Exception to the rule on that case.
I don't know, if you can disregard the error messages of dependency walker here, but obviously you have the dependency of an comdlg32.DLL, is that the correct 32bit DLL, too?

And when you register at the customers machine in the app folder you must use
c:\Windows\SysWoW64\Regsvr32 c:\pesesp\comdlg32.ocx
Qualify to use the regsvr32 of Syswow64, or you may start the 64bit version and then also fully qualify the location of the OCX. Very obvious, isn't it? Also about the DLL dependency, did you only put an OCX file there?

Bye, Olaf.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
So comdlg32.dll that is present on my PC

img001
Maybe is missing at the user's PC, isn't it?

I guess when installing comdlg32.ocx its dependency comdlg32.dll is instaled also...but aparently it isn't
since it's not  installed at .exe folder (c:\pesesp\).

So on my PC it uses comdlg32.dll that remains at C:\Windows\SysWOW64\

Is it necessary also to copy comdlg32.dll at C:\Windows\SysWOW64\ or C:\Windows\System32\ to finally make it to run?
pcelbaCommented:
Yes, comdlg32.dll is necessary.

Comdlg32.ocx is a part of Visual Basic 6 (or Visual Studio 6). Once you install it then all dependent DLLs should be in place. Of course, this is not easily achievable on client's computer...

If it runs when you register it in your app folder then it means you have all dependent DLLs available but something is missing on client's computer.

You should look at Dependency walker output on client's computer. You may also look at these instructions: http://www.bioinformatics.org/snp-tools-excel/install_comdlg32.htm

Somebody was successful with COMDLG32 after installing COMCTL32.OCX as described here: https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-winapps-appscat_tools/comctl32ocx-file-missinginvalid-for-windows-10/0d515059-0397-4b72-a39b-120a7be96043

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Backing to my PC where all the components are present, I regenerate the .EXE with this configuration:

img002
the last time I did it was at user's PC - maybe it had no effects because the .DLL wasn't present there.

It doesn't include the comdlg32.dll with the new .EXE generated. So the instalation package will include comdlg32.dll to be copied at the app folder.

Also I ask to the user to correct install the .OCX at correspondent Windows folder, like said.


•             Win7 32 bits:

c:\Windows\system32\REGSVR32  comdlg32.ocx
c:\Windows\system32\REGSVR32  richtx32.ocx
and
C:\Windows\System32\Regsvr32 COMCTL32.OCX


•             Win7 64 bits:

c:\Windows\SysWoW64\Regsvr32 comdlg32.ocx
c:\Windows\SysWoW64\Regsvr32 richtx32.ocx
and
c:\Windows\SysWoW64\Regsvr32 COMCTL32.OCX


Additionally - only if the .EXE itself fails to runs comdlg32.dll - ask to manually install
(Even, in my PC this operation is not correctly completed).

c:\Windows\system32\REGSVR32  comdlg32.dll
c:\Windows\SysWoW64\Regsvr32 comdlg32.dll
pcelbaCommented:
No, comdlg32.dll is not suitable for registration. It is just used by some registered OCXes.  The comdlg32.dll should be in the same folder where the OCX is placed.

The Options / Controls dialog is used in the Form designer only. It has no impact to the created EXE.
Eduardo FuerteDeveloper and AnalystAuthor Commented:

The Options / Controls dialog is used in the Form designer only. It has no impact to the created EXE.

So, it's utility is only during development phase... isn't it?
pcelbaCommented:
Yes, the setting is used during the development phase but the component installation and registration is necessary on all client's computers.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
The user is going to install and actualize the components next hours and if needed directly copy comdlg32.dll on Windows.
I am going to return with the results as soon as possible.
Thank you by now.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
After all the user's position was no success yet...

Reading the question from the start... Pcelba post


MSComDlg.CommonDialog requires MSVCRT.DLL.

And I missed it.

So I ask him to simply paste   msvcrt.dll  on the folder
c:\Windows\system32\

Just copy since I guess it is not suitable for registration too.

I'm still waiting.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
No success.

Thank you for your participation.

I decided to change to another equivalent feature and will return back here to ask for suggestions....
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Changed by this:


Changed by this:
pcelbaCommented:
Just a note: MSVCRT.DLL must be in SysWOW64 folder (valid for 64 bit Windows). Registration of this DLL is not possible.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.