?
Solved

Problems Registering Threed32.ocx

Posted on 1998-07-08
4
Medium Priority
?
2,240 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
ID: 1465218
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
ID: 1465219
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 600 total points
ID: 1465220
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
ID: 1465221
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month17 days, 6 hours left to enroll

862 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