Hi Franco,
I tried your code and it works as you said. It is interesting! However, how do i unregister the class? Regsvr32 doesn't work on it as it is a .net assembly.
Thanks,
David
>Hi William,
>just create a new .Net solution, add a "Class Library" project to the solution.
>In the project properties check the "Register for COM interop" checkbox, add code to the classes, for example:
>
>Public Class Class1
> Public Function hello()
> Return "hello"
> End Function
>End Class
>
>Generate the solution, switch to VFP, in the command window type:
>
>xx=CREATEOBJECT("theprojectname.class1")
>?xx.hello
>
>you are done.
>
>there's also a Rick Strahl article:
>NET Interop for Visual FoxPro Applications
>
http://www.west-wind.com/presentations/VFPDOTNETiNTEROP/VFPDOTNETINTEROP.HTM>
>HTH
>Franco
>
>>A while back [someone find it and tell me] there was a discussion about classlibraries in dot net that were callable directly from VFP.
>>
>>anyone make any headway ?
>>
>>can't remember with language it was ^from, but some folks had some inroads and made some progress.
>>
>>mondo regards [Bill]
>>ps - I could be dead wrong, of course - this may have been some discussion over at ProFox.