Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Declare DLL Problem
Message
From
26/07/2002 09:49:38
Leo Kool
Agis Automatisering BV
Harmelen, Netherlands
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00682444
Message ID:
00682963
Views:
26
The filling up always goes OK, when I issue the calculation VFP generates the "DECLARE DLL call cause an exception" error after I fill the dll with aprox. 9300 or more records. The error comes from inside the dll, when debugging is set on in the dll, I see that de NRS_CALCULATE call starts in de debug log.
The code and the data must be OK, it's works fine with "little" data set's.

Here's a part of the code (yes it's from a dairy management system)
a part of the DECLARE DLL's:
DECLARE INTEGER NRSINITIALIZE 		IN NRSLWBSK ;
	INTEGER tnVar, INTEGER @tnResult 

DECLARE INTEGER NRSFILLHERDALL		IN NRSLWBSK ;
	INTEGER tnEndDate, INTEGER tnEndTime, INTEGER tnStartDate, INTEGER tnStartTime, ;
	INTEGER tnMilk, INTEGER tnFat, INTEGER tnProtein, INTEGER tnFree, INTEGER @tnResult

DECLARE INTEGER NRSFILLCOWALL		IN NRSLWBSK ;
	INTEGER tnCalvCL, INTEGER tnStatus, INTEGER tnGoal, INTEGER tnGroup, ;
	INTEGER tnBirthDate, INTEGER tnCalvingDatePrev, INTEGER tnCalvingDateCL, ;
	INTEGER tnDryDateCL, INTEGER tnExpectedCalvingDate, INTEGER tn305Milk, ;
	INTEGER tn305Fat, INTEGER tn305Protein, INTEGER tnArrival, INTEGER tnCulling, ;
	INTEGER tnFree1, INTEGER tnFree2, INTEGER tnFree3, INTEGER @tnResult, STRING @tcCow

DECLARE INTEGER NRSFILLRECORDPART1	IN NRSLWBSK ;
	INTEGER DATEMR, INTEGER TIMEMR, INTEGER DATEPMK, INTEGER TIMEPMK, INTEGER KINDMR, ;
	INTEGER KGM, INTEGER FATPER, INTEGER PROTPER, INTEGER SCC, INTEGER UREUM, INTEGER LACTOSE, ;
	INTEGER F1, INTEGER @RESULT, STRING @COWP

DECLARE INTEGER NRSFILLRECORDPART2	IN NRSLWBSK ;
	INTEGER DATEMR, INTEGER TIMEMR, INTEGER KINDMR, INTEGER KGMMOR, INTEGER KGMEVE, INTEGER KGMTHIRD, ;
	INTEGER STATMILK, INTEGER ITOS, INTEGER ISF, INTEGER REL, INTEGER STATCOW, ;
	INTEGER F2, INTEGER F3, INTEGER F4, INTEGER F5, INTEGER @RESULT, STRING @COWP)

DECLARE INTEGER NRS_CALCULATE		IN NRSLWBSK ;
	INTEGER tnChoise1, INTEGER tnChoise2, INTEGER @tnResult
First initialize input and output in the dll:
NrsInitialize(IIF(EMPTY(tnInit), 3, tnInit), @lnResult) && 3 init. input and output
Then fill the dll with a herd record...
NRSFILLHERDALL(.mnDateToInt(.pdMilkRecord), 0000, 0, 0000, c_DagProdBedr.nDD202174, ;
	c_DagProdBedr.nDD202183, c_DagProdBedr.nDD202153, 0, @lnResult)
Then fill the dll with cow record's...
(called multiple times depending on the records in the cursor)
NRSFILLCOWALL(nDD200112, lnStatus, lnDoel, lnNrsGrpNr, .mnDateToInt(dDD201695), lnPrevCD, ;
	.mnDateToInt(dDD200042), .mnDateToInt(dDD200513), lnExpCD, ln280095, ;
	lnVet305, lnEiwit305, 0, 0, 0, 0, 0, @lnResult, @lcLevNr)
Then fill the dll with the cow's milkrecording record's...
(called multiple times depending on the records in the cursor)
NRSFILLRECORDPART1(.mnDateToInt(ddd200061), 0, 0, 0, 0, lnMelk, lnVet, lnEiwit, 0, 0, 0, 0, ;
	@lnRESULT1, @lcLevNr)
NRSFILLRECORDPART2(.mnDateToInt(ddd200061), 0, 0, lnMelkMorgen, lnMelkAvond, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ;
	@lnRESULT2, @lcLevNr)
After the dll is filled up issue a calculation...
lnBskOnly	= IIF(tlBskOnly, 1, 0)
Nrs_Calculate(lnBskOnly, 0, @lnResult)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform