Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# COM Intertop Not Right With VFP?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00651339
Message ID:
00651695
Views:
20
This message has been marked as the solution to the initial question of the thread.
>In the .NET IDE, I compile my .cs so I can get the debug info. But i am also partial to using csc... Mostly because I don't know what the $@&%! is going on in the IDE half the time. Anyway...
>
>1. Compile the .cs into a .dll
>2. At the command line, "sn.exe -k dllname.snk" to create a .NET strong name for the Global Assembly Cache
>3. In the IDE Put the name of the created keyfile into the assemblyinfo.cs file
>4. At the commmand line, "gacutil.exe /i bin\Debug\dllname.dll"
>
>At that point, I can instance the dll from a .vbs. I am drawing a blank at the moment, but I think I could then do it from VFP too.

You need to register the .NET DLL as a COM object. You can find the details on how to do this in Rick Strahl's whitepaper .NET Interop for Visual FoxPro Applications at http://west-wind.com/presentations/VfpDotNetInterop/vfpDotNetInterop.htm, in the section two thirds into the doc called Accessing .NET objects through COM. The trick is through the VS .NET UI or command line Regasm /codebase DotNetCom.dll

For more information about Visual FoxPro with .NET, go to the new site on Microsoft's GotDotNet.com site at http://gotdotnet.com/team/vfp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform