TonySullivan
New member
- Joined
- Jan 3, 2011
- Messages
- 1
- Programming Experience
- 10+
Hello,
I have a situation where I need to connect to a VB6 ActiveX exe from VB.Net 2010.
When I attempt to call a sub on the ActiveX object over DCOM I receive the error:
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
The subroutine in the ActiveX exe is defined as:
Public Sub GetEmployeeData(ByVal SNum As String, ByRef sComp As String, ByRef sYStart As String, _
ByRef sYEnd As String, ByRef sMCon As String, ByRef sMRem As String, ByRef sMnn As String, _
ByRef sMend As String, ByRef sMk As String, ByRef sMItems As String, _
ByRef sMms As String, ByRef sMCms As String, ByRef sMAmt As String, _
ByRef sMkDate As String, ByRef sDCon As String, ByRef sDRem As String, ByRef sDnn As String, _
ByRef sDend As String, ByRef sDk As String, ByRef sDItems As String, _
ByRef sDms As String, ByRef sDCms As String, ByRef sDAmt As String, _
ByRef sDkDate As String, ByRef sRDate As String, ByRef sDLog As String)
When I call the routine I am also using strings with the same name and count in the calling routine. Is there an incompatibility between the strings in VB6 and VB.Net over DCOM? I had thought that marshaling would take care of that, but maybe not. Is there some other data type I should use in VB.Net?
Thanks for any assistance.
Edit/Delete Message
I have a situation where I need to connect to a VB6 ActiveX exe from VB.Net 2010.
When I attempt to call a sub on the ActiveX object over DCOM I receive the error:
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
The subroutine in the ActiveX exe is defined as:
Public Sub GetEmployeeData(ByVal SNum As String, ByRef sComp As String, ByRef sYStart As String, _
ByRef sYEnd As String, ByRef sMCon As String, ByRef sMRem As String, ByRef sMnn As String, _
ByRef sMend As String, ByRef sMk As String, ByRef sMItems As String, _
ByRef sMms As String, ByRef sMCms As String, ByRef sMAmt As String, _
ByRef sMkDate As String, ByRef sDCon As String, ByRef sDRem As String, ByRef sDnn As String, _
ByRef sDend As String, ByRef sDk As String, ByRef sDItems As String, _
ByRef sDms As String, ByRef sDCms As String, ByRef sDAmt As String, _
ByRef sDkDate As String, ByRef sRDate As String, ByRef sDLog As String)
When I call the routine I am also using strings with the same name and count in the calling routine. Is there an incompatibility between the strings in VB6 and VB.Net over DCOM? I had thought that marshaling would take care of that, but maybe not. Is there some other data type I should use in VB.Net?
Thanks for any assistance.
Edit/Delete Message