Solved

Problems Registering Threed32.ocx

Posted on 1998-07-08
4
2,112 Views
Last Modified: 2010-05-18
I am attempting to install a VB4 app onto a pc which requires threed32.ocx.  I have copied the .ocx and the .oca files to the windows\system and tried to register them with regsvr32 but it gives me back "GetLastError Returns 0x00000485".  When I try to run the VB app I get a "Runtime error 367 Can't Load (or register) custom control Threed32.ocx".  Can anyone help me, please?
0
Comment
Question by:jeremy2000
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Dalin
Comment Utility
jeremy2000,
Did you use the app wizard to make the installation disk?
If you did, it should take care of it for you.

You can try to install VB4 and choose costom, and just install the controls.

The following code register the commonControl. You can try to adjust for the Threed32 to see what happens.
Regards
Dalin


Declarations

Copy the following code into the declarations section of your projects.

Declare Function RegComCtl32 Lib "ComCt32.OCX" _
Alias "DllRegisterServer" () As Long

Declare Function UnRegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllUnregisterServer" () As Long

Const ERROR_SUCCESS = &H0  

Code

To register the Microsoft Common Controls, use this code:

If RegComCtl32 = ERROR_SUCCESS Then
    MsgBox "Registration Successful"
Else
    MsgBox "Registration Unsuccessful"
End If

If UnRegComCtl32 = ERROR_SUCCESS Then
    MsgBox "UnRegistration Successful"
Else
    MsgBox "UnRegistration Unsuccessful"
End If  
0
 

Author Comment

by:jeremy2000
Comment Utility
I originally installed it using a Wise 5.0g  installation, but it would not register the control.

I have already installed VB4 and it wouldn't register the control then either. If I then try to load the control I get the same message.

Thanks anyway.
0
 
LVL 1

Accepted Solution

by:
gissing earned 150 total points
Comment Utility
The GetLastError() number points to the problem. 0x485 is:
"One of the library files needed to run this application cannot be found. " This means that the OCX uses one or more libraries which aren't on the target machine.

Dependency Walker (in the platform sdk) shows that my copy of threed32.ocx has the following dependecies:

MFC40.DLL
MSVCRT40.DLL
ADVAPI32.DLL
OLE32.DLL
OLEAUT32.DLL

in turn, each of these dll's also have other dll's on which they rely.

Your first plan of attack should be to check your development machine for a correctly registered threed32.ocx. (re-install vb if necessary). Also, you may like to un-register and then re-register the threed32.ocx just to make sure. Then use VB's own installation wizard to install your application, and check on the target machine when this is done that you have all the above dll's (I'll give you the list of their dependencies if you need it)
0
 

Author Comment

by:jeremy2000
Comment Utility
This sounds like what I need.  Could you send me the list of dependencies please, and also let me know if there is somewhere that I can find a complete listing of files (.OCX's mostly) and their dependencies.

Thanks a lot

Mark.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now