General information
Category:
Coding, syntax & commands
Hi Mike
I look at the link you gave to me and soma others related and I found this small sample:
************** sample start *****************************
This example demonstrates how VB6 COM client using CCW accesses a Component developed in VB.NET.
VB.NET Component (testCCW.vb)
imports system
namespace CCWComponent
public class CCWClass
public function PassStr As String
PassStr = "Hi From .NET Component"
end function
end class
end namespace
Save this code to a text file with the name testCCW.vb. ************ ok
Now compile this file from the command line with the statemant
Vbc /t:library testCCW.vb **************** ok
The VBC compiler will create a testCCW.dll file for you, this is the .NET assembly. ********** ok
Now, the next step is to create Com Callable Wrapper proxy for the component testCCW.dll file.
The regasm utility can register the .NET component and also create a .TLB file, which can be referenced from any COM client.
Regasm testCCW.dll /tlb:testCCW.tlb ****************** ok
***************** IN VB6
Private Sub Command1_Click()
dim o
set o = createobject("CCWComponent.CCWClass")
msgbox o.PassStr
end sub
************** sample end *****************************
In VFP:
loTest = createobject("CCWComponent.CCWClass")
? loTest.PassStr
In both VB and VFP error occurs: "OLE error cod 0x80070002..."
Any idea would be great because I'm new dealing with this problems.
Thank's in advance,
NPedro
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only