We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Installing a Com Object

Medium Priority
237 Views
Last Modified: 2013-11-25
I made a simple COM object that makes a dialog box. I am having problems registering it on a non development machine. I can't hand register it on my development machine but VC 5.0 is able to register it. I have used some program to find which dlls the object needs and the estination machine has them. The object works fine with VC 5.0 and VB 5.0.

I would like to know what is the missing ingredient?
Comment
Watch Question

Author

Commented:
Edited text of question

Commented:
Strange I had a similar problem which I solved just this morning. I was having problems registering my OCX control on Win NT 3.51 machine. If it helps my problem was there being different versions of OLEAUT32.DLL files. It seems that the older versions cannot read the type library which was compiled with the newer versions. So the AfxOleRegisterTypeLib was failing for me. I just generated the type library and explicitly loaded the generated type library and that works now.

So instead of calling AfxOleRegisterTypeLib(handle, tlid) I call it as
AfxOleRegisterTypeLib(handle, tlid, _T("file.tlb")). I just need to make sure that the type library file is in the same directory as the ocx file.

If U are having a COM object generated using an ATL project, U may want to see microsoft VC++ FAQ. I don't remember the address, but if U go into microsoft search and search for AfxOleReisterTypeLib, U will come up with the VC++ FAQ as one of the result. There is a question there about why registration fails.
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks for all of your help. My problem has a lot of different parts to it. I am using Installshield to install the COM object. I stopped messing with that and I tried to hand register it using regsv32. It failed. My next attempt was to move the dll to a network drive and try to register it from the machine that failed. That also failed. The dlls and tlb files are from a machine that I was able to hand register successfully.

I think I have moved from a "missing dll" situation to a "dll version mismatch" situation.

As for T004024's comments, I am using MFC and ATL, I think that the typelibrary stuff is being handled by MFC.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.