Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Doubts about DLLs and Custom Classes
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Doubts about DLLs and Custom Classes
Miscellaneous
Thread ID:
00512787
Message ID:
00512787
Views:
100
Hi everybody,
This is my problem :
I'm developing an application in VFP and I have some prgs I don't want to be public but I want them to be accessible for other applications maybe.
So I copied a PRG to another directory and modified it to look something like this:

*** PRGDLL.PRG *****

define class ABCCrypt as CUSTOM OLEPUBLIC

procedure ABCEncrypt(Key, Text )
// all the function code
endproc

procedure ABCDecrypt(Key, Text )
// all the function code
endproc

enddefine

then I compile it with other PRG like this :

build project MyProy RECOMPILE FROM PrgDll.PRG
BUILD DLL ABCCrypt FROM MyProy

it creates ABCCrypt.dll, ABCCrypt.VBR, ABCCrpyt.tlb
then I can call this function like this:

o = createobject("ABCCrypt.ABCCrypt")
o.ABCEncrpyt(pass, @text )

I tried it and works fine.... now my doubts are:
1) I don't really know why it works sometimes and sometimes not.... is it enough to copy the .dll to the application dir ? or do I need something else?
I saw an example that it needed to copy .VCT and .VCX also... but I don´t have them... do I need them?
The error I get if I move the dll to the app dir is : "Estado de COM desconocido"... something like "COM not found"

2) When I distribute the app in other machines, it says "ABCCrpyt.ABCCrpyt class not found" ..... why is this if I have the dll in that machine ?

I guess it's enough by now....
thanks all
fabian
Next
Reply
Map
View

Click here to load this message in the networking platform