Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating DLL:s in VFP5?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00089709
Message ID:
00089788
Vues:
24
>>>Hi.
>>>
>>>I want to create a win32 DLL. I cannot use C or C++. Is there
>>>anothere way to create DLL:s. Can I use VFP5 or any other tool?
>>>
>>>/Magnus
>>
>>You can create a DLL in VFP 5, but it's as an OLE server and accessed via the CREATEOBJECT() syntax.
>>
>>With normal DLLs you would declare the function in the DLL and call it like any other function. For example, if you created a normal DLL in C++ with MyCalc as a function you might declare it and call it with:
>>
>>DECLARE INTEGER MyCalc IN MyDLL;
>>  INTEGER int1, INTEGER int2
>>lnresult = MyCalc(5, 10)
>>However, if you built the same function as an OLE server DLL in VFP, you'd:
>>
>>oMyObj = CREATEOBJECT('MyDLL.MyClass')
>>lnresult = oMyObj.MyCalc(5, 10)
>>hth,
>
>OK.
>Can you call this DLL from another program for example PowerBuilder.
>And do you have to distribute the VFP dlls that are needed for EXE
>applications.
>I would like to create a DLL (a single file) that can be used from any application that supports API-calls. The problem is that I can't
>write a single line of C or C++. And people have told me that C is
>a bit tricky to learn so I thought that perhaps I could use some 4GL
>tool to do this for me?
>
>/Magnus
Any application that can create OLE Automation objects can access the functions, set properties (provided they're not hidden or protected) can access your DLL.

Chapter 16 of the developer's guide provides the details, plus how to setup etc.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform