Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dialer??
Message
De
06/11/2008 10:50:35
 
 
À
06/11/2008 08:48:12
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01359668
Message ID:
01360191
Vues:
17
The difference is in how you use it. A Win32 DLL must be DECLAREd for VFP to use it. The DECLARE statement also defines what the interface looks like (you have to explicitly define in your code what the interface looks like).

With COM late binding, the DLL must be registered (an entry is placed in the system registry) that specifies the name, GUID, directory holding the DLL, and some other things. VFP then goes to the registry, get's the location, and reads the interface at runtime either from the type library (TLB) or the DLL itself. Note that you don't have to defne the interface in your code. You then use CREATEOBJECT() to use it.

Also, under Win32, you just make function calls. With COM, you instantiate an object and call methods or access properties. IMO, COM is a much cleaner interface and easier to use, but then the nasty details of how to implement all this stuff is hidden from us.

If you try to use a COM DLL with DEFINE or a Win32 DLL with CREATEOBJECT(), you'll get an error.


>Isn't a COM DLL just a DLL that implements the COM interface? I didn't think there was anything governing what other methods it might expose....
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform