Greetings,
I have an ActiveX exe component that is getting called by a stand alone exe, both were developed in VB 6.0. The component is throwing a "type mismatch" 13 error.
Here is an excerpt of the code where the ActiveX exe is being declared and instantiated in the program:
When the class gets instantiated, it throws a "type mismatch 13" error. Setting a breakpoint in the component class, I can see it run the initialization method without any errors. Then, it goes right into the terminate method. No errors appear to be thrown in the component. I can't see where the problem is. There are many classes in this ActiveX compoment that implement CDBSReport, and they all throw the same mismatch error when called.
This code has worked for a long time, and none of the class names or method names have changed. I recently made a change to one of the dlls that this component and the stand alone uses. One of the parameters in a particular method was changed from an integer datatype to a long datatype. I have ensured that the correct datatypes are being passed in. I have spent many hours recompiling everything and still this error occurs. We are running this in a Windows 2008 R2 environment.
What could be wrong here? How do I debug this?
Many thanks.
I have an ActiveX exe component that is getting called by a stand alone exe, both were developed in VB 6.0. The component is throwing a "type mismatch" 13 error.
Here is an excerpt of the code where the ActiveX exe is being declared and instantiated in the program:
Code:
.
.
.
Const errSUMMARY = 9310
Dim Msg_Summary As CDBSReport '<-- implements CDBSReport
Dim Report_Settings As CDBSReports.rptSummary
Dim First_Page As Integer
On Error GoTo ErrorHandler
First_Page = Page_Number
'Determine the size of the margins for the current page
With Word_Document.Sections(Word_Document.Sections.Count).PageSetup
Top_Margin = IIf(.Orientation = wdOrientPortrait, .TopMargin, .RightMargin)
Bottom_Margin = IIf(.Orientation = wdOrientPortrait, .BottomMargin, .LeftMargin)
End With
Set Msg_Summary = New CDBSReports.rptSummary '<--- error occurs here, rptSummary implements CDBSReport
.
.
.
When the class gets instantiated, it throws a "type mismatch 13" error. Setting a breakpoint in the component class, I can see it run the initialization method without any errors. Then, it goes right into the terminate method. No errors appear to be thrown in the component. I can't see where the problem is. There are many classes in this ActiveX compoment that implement CDBSReport, and they all throw the same mismatch error when called.
This code has worked for a long time, and none of the class names or method names have changed. I recently made a change to one of the dlls that this component and the stand alone uses. One of the parameters in a particular method was changed from an integer datatype to a long datatype. I have ensured that the correct datatypes are being passed in. I have spent many hours recompiling everything and still this error occurs. We are running this in a Windows 2008 R2 environment.
What could be wrong here? How do I debug this?
Many thanks.