Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a DLL of a function to call from VFP
Message
 
À
19/06/2008 17:14:37
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
Divers
Thread ID:
01325489
Message ID:
01325703
Vues:
12
>on reading more carefully is sounds like you're suggesting the class interface attribute in addition to setting the project property , is that correct?
>

Yes. In every COM-interop situation I've been in I've just exposed the stuff I wanted to via the attributes. So, in addition to selecting the option to Register for COM interop, I've added the explicit attributes to tell it what to export in the type library.

When registering it, I haven't gone the strongly-named route either, I've just used REGASM MyAssembly.DLL /codebase - you don't have to do this on your development machine since it will happen automatically when you build, but you do have to do it when you distribute your app.

OK, I just did a quick test in VB.NET - the option to expose it as a COM component is under "Compile", almost the last option on the screen. The attributes are slightly different:
Imports System.Runtime.InteropServices

<ClassInterface(ClassInterfaceType.AutoDual)> _
<ComVisible(True)> _
Public Class MyTest
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform