I migrated application from vb to vb.net I am facing one issue. That is, my application getting data from vc++ dll code is
VB.NET
With mobjReply
str =Trim(.GetRecord(0)(0))
str2= Trim(.GetRecord(0)(1))
End WithVB application giving correct data like name, and phone but vb.net giving {System.__ComObject}
Please suggest how can I fetch data?
Thanks

VulpesRank #55 · 29.2K reputationPosted Jun 18, 2012, 1:25 AM EDT
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.
VulpesRank #55 · 29.2K reputationPosted Jun 13, 2012, 8:38 AM EDT
Areeb Quazi96 reputationPosted Jun 13, 2012, 10:42 PM EDT
?mobjReply.RecordCount
1
?mobjReply.GetRecord(0)(0).ToString()
"System.__ComObject"
Please find attached zip which is image of properties shown by intellisense
VulpesRank #55 · 29.2K reputationPosted Jun 14, 2012, 12:14 AM EDT
Areeb Quazi96 reputationPosted Jun 14, 2012, 1:57 AM EDT
mobjReply.GetRecord(0)(0). giving
.GetHashCode
.GetType
.RefrenceEqual
.ToString
. EqualsVulpesRank #55 · 29.2K reputationPosted Jun 14, 2012, 5:08 AM EDT
Do you have any documentation for the corresponding VC++ COM interface?
Areeb Quazi96 reputationPosted Jun 15, 2012, 4:10 AM EDT
showing object in .net. same code working in vb6 and giving proper result.
VulpesRank #55 · 29.2K reputationPosted Jun 15, 2012, 9:59 AM EDT
Areeb Quazi96 reputationPosted Jun 18, 2012, 12:28 AM EDT
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 givingAreeb Quazi96 reputationPosted Jun 18, 2012, 2:18 AM EDT
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..
VulpesRank #55 · 29.2K reputationPosted Jun 18, 2012, 2:44 AM EDT
Pleased that you've finally managed to solve it :)
Areeb Quazi96 reputationPosted Jun 18, 2012, 6:48 AM EDT
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