Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DLL is not Found
Message
 
To
29/01/2009 16:17:20
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01378274
Message ID:
01378280
Views:
12
>When I run the code below
>
>Arquivo_Inix = SYS(5) + SYS(2003) + "\SISTEMA.ini"
>loBIBLIO_Ini = CREATEOBJECT("arquivos_ini.dll", Arquivo_Inix)
>
>It returns this error message:
>
>"Class definition ARQUIVOS_INI.DLL is not found."
>
>arquivos_ini.dll is a Multi-threaded COM DLL generated with VFP and is registered.
>I'm also passing a value to the INIT event of the DLL
>
>Any ideia why it doesn't work?
>
>TIA

You could make an instance f VFP created DLL like this:
DLLName.ClassInIt

So, you MUST use this:
loBIBLIO_Ini = CREATEOBJECT("arquivos_ini.ClassNameFromThatDLL")
Also keep in mind that COM server didn't accept parameters in INIT event, so you must create your own method to handle what you want. Let me explain (I hope I could)

Make a project named ARQUIVOS_INI.
Add a Program in it, no matter what its name.
In that ORG put:
DEFINE CLASS MyClass AS Custom OLEPUBLIC

      FUNCTION HandleINIFiles(lcPath AS STRING) AS String
         LOCAL lcRetVal
         lcretVal = ""
         IF NOT EMPTY(m.lcPath)
            **** do what you want to do here
         ENDIF
     RETURN  lcRetval

ENDDEFINE
Then in other application you cold use this:
Arquivo_Inix = SYS(5) + SYS(2003) + "\SISTEMA.ini"
loBIBLIO_Ini = CREATEOBJECT("arquivos_ini.MyClass")
? loBIBLIO_Ini.HandleINIFiles(m.Arquivo_Inix)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform