Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DLL written in VB for VFP use problem
Message
 
To
10/02/2003 08:53:12
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00751315
Message ID:
00751366
Views:
20
Not sure that I correctly understood you, but I'll try to answer.

>So for all my public, UDF and declare function which cannot be use in VB DLL,
>do I declare them to be private in my class declaration section ?
>
>What about declaration of DLL that I need to access to
>like below, do I declare them to be private in the
>class declaration section too ?
>
>Like :
>Public DECLARE ABC IN 'xxx.dll'
>
>To:
>Private declare ABC in 'xxx.dll'

In VFP your VB dll must not be declared. If you want to provide access to another dll using your VB dll, then you can declare functions in VB as private:

Private Declare Function ABC Library "xxx.dll"

Public Function Class_ABC
Class_ABC = ABC()
End Function

>Finally, why COM DLL created in VB can be access by VFP
>by creating an instance whileas other DLL we can access it
>by DECLARE command. How do we tell them apart ?

There are two different types of DLLs (not including .NET). To distinguish them you can use, for instance, Depends program from Visual Studio. COM DLLs usually have 4 exported functions: DllCanUnloadNow, DllGetClassObject, DllRegisterServer and DllUnregisterServer. You can also try to register DLL using regsvr32 utility. You'll get an error for non-COM DLL.
Previous
Reply
Map
View

Click here to load this message in the networking platform