General information
Category:
COM/DCOM and OLE Automation
>>Hi All
>>I have made a single threaded Com server Dll with a Class
>>If I use it in VFP it Works like a charms
>>But my VB fellow can't use it
>>How can he use it in VB.
>>
>>My dll name is comvb.dll and have a methode name meval in it
>>I use it like this
>>otest = CreateObject('comvb.vbeval')
>>? otest.meval('1<2') && return .t.
>>I have made this dll for the vb programmer, He can use the Eval() function in it
>>
>>Thanks for the tips
>>
>>Benoit
>
>Benoit, did you (or him) add your VFP COM object type library to VB project?
>
>In order to use VFP COM (or any other COM)in VB the corresponding type library should be added to the project through Project/References menu option (find it in the list and put the checkmark next to it) so it will be available in your VB project.
>
>Then you can instantiate it for example from VB form something like this:
>
>Option Explicit
>Public oTest As Object
>
>Private Sub Form_Initialize()
> Set oTest = New vbeval
>End Sub
If you have it in the references then it is best that you take advantage of early binding by declaring the variable of the specific object type. Say:
Dim oTest As myVFPClass.vbeval
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