I migrated application from vb to vb.net I am facing one issue. That is, my application getting data from vc++ dll code is
With mobjReply
str =Trim(.GetRecord(0)(0))
str2= Trim(.GetRecord(0)(1))
End With
VB application giving correct data like name, and phone but vb.net giving {System.__ComObject}
Please suggest how can I fetch data?
Thanks
VulpesPosted Jun 18, 2012, 5:25 AM
However, we still don't know which property of this interface yields the actual string value.
Guessing that the property might be called 'Value', I'd try this :
When you type the dot before Value then, hopefully, intellisense will tell you what properties the IxchReq32Item interface has and, if Value isn't one of them, you might be able to guess what to use instead.
Areeb QuaziPosted Jun 18, 2012, 10:48 AM
I tried totally in wrong direction like.
Dim myAsm As Assembly
myAsm = Assembly.LoadFrom("Interop.my.dll")
' from assembly, get the target object
Dim myObject As Object = myAsm.CreateInstance("TestObject.TestClassClass")
' from assembly, get the type definition
Dim myType As Type = myAsm.[GetType]("TestObject.TestClassClass")
' this would have worked too
'Type myType = myObject.GetType();
Realy thankfull to you. You shown me correct solution specially in such a condtion when you dont have code
VulpesPosted Jun 18, 2012, 6:44 AM
Pleased that you've finally managed to solve it :)
Areeb QuaziPosted Jun 18, 2012, 6:18 AM
I checked and found GetFieldVal is there.
CType(.GetRecord(0)(0), ExchSrv32.IExchReq32Item).GetFieldVal())Got data. I am realy thankful to you for your Help and time spent to help me.
Thank you very much..
Areeb QuaziPosted Jun 18, 2012, 4:28 AM
Thanks for your help I tried both message boxes and I got...
First messagebox giving
IxchReq32
IxchReq32 : public IDispatch
{
IxchReq32Item
I checked in VC++ code it showing like
strcture IxchReq32 abstract adn
structure IxchReq32Item abstract
If vb.net doest not understand COM Then could you please suggest wthat else i need to do
Secound messagebox givingVulpesPosted Jun 15, 2012, 1:59 PM
Areeb QuaziPosted Jun 15, 2012, 8:10 AM
showing object in .net. same code working in vb6 and giving proper result.
VulpesPosted Jun 14, 2012, 9:08 AM
Do you have any documentation for the corresponding VC++ COM interface?
Areeb QuaziPosted Jun 14, 2012, 5:57 AM
mobjReply.GetRecord(0)(0). giving
.GetHashCode
.GetType
.RefrenceEqual
.ToString
. EqualsVulpesPosted Jun 14, 2012, 4:14 AM
Areeb QuaziPosted Jun 14, 2012, 2:42 AM
?mobjReply.RecordCount
1
?mobjReply.GetRecord(0)(0).ToString()
"System.__ComObject"
Please find attached zip which is image of properties shown by intellisense
VulpesPosted Jun 13, 2012, 12:38 PM