|
-
Jun 6th, 2005, 09:32 PM
#1
Thread Starter
Junior Member
COM Error -- Not valid or not Registered
I have created a VB6 activex dll that contains a class and a module. I am using the dll with vb.net. It works fine on the computer that created the .dll but any other computer I get the error:
COM object with CLSID {4BA598BC-92D8-4F99-B380-DF85D887AFCC} is not valid or not registered
If I go into the registry on the computer that compiled the dll it looks like {4BA598BC-92D8-4F99-B380-DF85D887AFCC} is pointing to the module in the dll? I cannot figure out how to fix this.
Any help would be appreciated.
Thanks
Jason
-
Jun 7th, 2005, 07:55 AM
#2
Re: COM Error -- Not valid or not Registered
How did the file get on other computers? Was it installed there using an installation setup package, or just copied?
If it was just copied, then it is not getting properly registered. You can try manually registering it using Regsvr32, but the best way to go is to bundle your Dll in an setup package, and then run the setup from the client machines. That will/should take care of registration issues.
-
Jun 7th, 2005, 10:44 PM
#3
Thread Starter
Junior Member
Re: COM Error -- Not valid or not Registered
I tried RegSvr32 and I get
the .dll has loaded but DllRegistryServer entry point was not found. DLL cannot be registered
Any ideas?
Thanks
-
Jun 8th, 2005, 02:15 AM
#4
New Member
Re: COM Error -- Not valid or not Registered
hi
try this
regsvr32 -u "path"
e.g.
regsvr32 -u "C:\Workspace\GridOCX\GridOCX\GridOCX.ocx"
where path is actual path for that file
-
Jun 8th, 2005, 10:42 PM
#5
Thread Starter
Junior Member
Re: COM Error -- Not valid or not Registered
I could not get that to work so I reworked the code a little, once again it works fine on my computer but not on anything else.
Here is the vb.net app code:
Dim out As Integer
Dim PLUGINBASE As Object
PLUGINBASE = CreateObject("Joy.Joystick")
Call PLUGINBASE.getjoy(out)
Here is the vb6 activex code:
Public Function GetJoy(Out As Long)
Dim J As JOYINFO
Dim je As JOYCAPS
Dim be As B
If IsWinNT Then
joyGetDevCapsW 0, je, Len(je)
Else
joyGetDevCapsA 0, je, Len(je)
End If
joyGetPos 0, J
GetBPress J.Buttons, be
For n = 0 To 7
If be.B(1) = True Then
Out = 1
ElseIf be.B(2) = True Then
Out = 2
ElseIf be.B(3) = True Then
Out = 3
ElseIf be.B(4) = True Then
Out = 4
ElseIf be.B(5) = True Then
Out = 5
ElseIf be.B(6) = True Then
Out = 6
ElseIf be.B(7) = True Then
Out = 7
ElseIf be.B(0) = True Then
Out = 8
Else
Out = 0
End If
Next n
End Function
Where the activex .dll uses a module (not shown) to read in button presses from the joystick.
I am now getting the error: Exception: Cannot create activex component
Any ideas?
Thanks
J
-
Jun 8th, 2005, 11:28 PM
#6
Thread Starter
Junior Member
Re: COM Error -- Not valid or not Registered
I have narrowed it down to a directory issue. It is looking for the activex .dll in the directory that I originally compiled it. If I move the .dll from that directory on my computer it craps out like the other computers, same exact message.
I do not know how to fix this problem though.
I want to be able to have the activex in the same directory as the app if possible, if not maybe the system folder then.
Thanks
J
-
Jun 9th, 2005, 10:54 PM
#7
Thread Starter
Junior Member
Re: COM Error -- Not valid or not Registered
I have finally figured out the problem and I think it may be resolved. No matter how or what I did I kept getting the regserver no entry point found. I decided to try to use the vb6 activex pure without tlbimping it and sure enough it did the trick.
But now my question is -- I thought you had to tlbimp it for it to work properly in vb.net? Is that not true?
Mine is working fine now but I dont want any problems in the near future.
Thanks
J
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|