Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DLL works in VFP 6.0 command, fails in runtime
Message
From
27/01/2000 00:33:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
DLL works in VFP 6.0 command, fails in runtime
Miscellaneous
Thread ID:
00323404
Message ID:
00323404
Views:
72
I have a 32 bit DLL that runs fine in the command line version of VFP 6.0, version 06.00.8492.00, but it fails when I try it in 6.0 runtime .06.00.8492.00. Fails may be too strong a word, suffice it to say that calls to the DLL that return positive numbers when called from command 6.0 return zeros when called from runtime.

Here is the code I use to add the object to a form:


Form Init method:

cZarLoc=[\czar\]
ThisForm.AddObject('oCzar','CZarRate',cZarLoc,'LITECZ02')

CZarRate Class Init method in code:

*********************************************************
PROCEDURE Init &&CZarRate
*******************************************************
LPARA tcDLLHome,tcTRF
LOCAL cDataPath
This.icDLLHome=tcDLLHome

* Call the Initializing function *********************
DECLARE Czar_InitializeCzar in (This.icDLLHome+'czar32.dll') AS cInit string
=cInit(tcDLLHome) && Initialize the Library

IF !EMPT(tcTrf)
This.icTrfName=UPPE(tcTrf)
ENDIF

* Set the data directory *********************
DECLARE Czar_Set_Czardata in (This.icDllHome+'czar32.dll') as czsetdata string
cdatapath=this.icDLLHome &&Data has to be in same directory as DLL itself
=CzSetData(@cdatapath) && Set the data directory up ('@' for pointer to a string)
RETU
ENDPROC


I'm not doing anything special to associate the DLL with the project/exe, do I need to? I just figured as long as my pointers are working, I should be OK.

I've searched this forum and haven't found anything, and as always, thanks in advance for any advice.
Next
Reply
Map
View

Click here to load this message in the networking platform