Hi,
I want to create a DLL. Things look good when I compile as single thread DLL. I have no message indicating that the DLL wasn't registered and, when I open the file using the object browser I can see methods and properties created.
My problem is that, when I want to declare the library with SET LIBRARY TO myDLL.dll I receive the message "Library file "MyDll.dll" is invalid". It's the first time that I try to create a DLL so I don't know where is the problem.
There is my code. As you will see I tried many things...
Thanks for your help!
*!* LPARAMETERS cAction,cData
*!* PUBLIC cNewAction, cNewData, cRetValue
*!* cNewAction = UPPER(cAction)
*!* DIMENSION aRush(4)
*!* STORE "X" TO aRush
*!* SET CLASSLIB TO _base.vcx
*!* oHandler = CREATEOBJECT("MyHandler",cNewAction)
*!* *MyHandler.init(cData)
*!* RETURN oHandler.value
*!* *READ EVENTS
DEFINE CLASS MyHandler AS Custom OLEPUBLIC
* cParam = ""
Value = "*"
*!* FUNCTION init (cString)
*!* * m.valeur = cString
*!* * INSERT INTO dllTest FROM MEMVAR
*!* * value = cString
*!* * RETURN cString
*!* DO CASE
*!* CASE cString = "INSERT"
*!* this.insert2
*!* CASE cString = "DELETE"
*!* this.delete2
*!* OTHERWISE
*!* this.other2
*!* ENDCASE
*!* ENDFUNC
* Procédure d'insertion
PROCEDURE Insert2
this.Value = "J'insère"
ENDPROC
* Procédure d'effacement
PROCEDURE Delete2
this.Value = "J'efface"
ENDPROC
* Procédure Autre
PROCEDURE Other2
this.Value = "Paramètre non valide"
ENDPROC
ENDDEFINE
Have a nice day,
Normand