General information
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only