Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Doubts about DLLs and Custom Classes
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00522543
Message ID:
00522739
Views:
8
Hello!

>1) Why I don´t need to registrer the CryptPak.dll ?? when I make a .dll by my own I need to carry MyDll.dll and MyDll.tlb to the app machine and do a Regsvr32 Path/MyDll.dll.... and sometimes it doesn´t even work.... or have version problems beetween VFP5 and VFP6 .... where is CryptPak.tlb ????

Only COM server DLLs need to register. I think CryptPak.dll is a common C-style DLL which exports functions and VCX used to incapsulate these functions in VFP class. Even COM DLLs not certainly have TLB files. Type library info may be included directly in DLL.

>2) Why if I open CrpytPak.vcx and .vct in VFP I see the Md5 method declared but I don´t see the function code ? where is it defined or how ?

Try to fing again. It may be defined in base class and IMO it simply calls a DLL function.

>3) I made a project just to try and included CrpytPak.vcx on it.
>I made another class MyClass into MyClasses.vcx and add methods to call the functions... (same code as above) ... and then compiled it as a Multiple COM
>MyDll.dll ... well... I have to register the dll to work!!.. and if I look the MyClasses.vct with notepad I see the entire code of the method (and I don´t want that)....

If you don't want the code be visible in Dll body, compile it with ENCRYPT option. MyClasses.vcx and .vct should not be distributed with your application.

>4) I call MY functions like this:
>obj = createobject("MyClass.Function")

??????? Functions and objects are different things.

>if I take .vcx and .vct ... do I need to register the .dll too ??
>or the "set classlib to" command does it by itself??

It's your choice how to use MyClass, directly from .vcx using "set classlib to" or "createobject()" or "newobject()" and .dll is not needed, or as COM object in Dll and .vcx not needed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform