Information générale
Titre:
Doubts about DLLs and Custom Classes
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement