Kbase P38550: pesetnthTableLocation API call difference between Crystal V8
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/08/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress V8.x
FACT(s) (Environment):
Progress V9.x
SYMPTOM(s):
pesetnthTableLocation API call difference between Crystal V8 and Crystal V9.
Crystal Report Error 707 with CRPE32.DLL
CHANGE:
Customer upgraded to Crystal Report V9.
CAUSE:
There is a change on the way you will use the call to the API Function pesetnthTableLocation contained in CRPE32.DLL between Crystal V8 and Crystal V9.
In V8 Crystal is expecting as parameter for pesetnthTableLocation the full path + FileName.txt.
In V9 Crystal is expecting as parameter for pesetnthTableLocation two extra characters and only the FileName.txt.
FIX:
You will need to adapt your code for testing the Crystal Version and depending on the Crystal Version you will sent to pesetnthTableLocation one value or the other.
In Example:
To get the Crystal Version.
/* Querying Version */
run PeGetVersion ( input 100, output iVersionDLLCrystal ).
If iVersionDLLCrystal = 0 Then iVersionDLLCrystal = 0.
Else do:
major = iVersionDLLCrystal / 256 .
minor = iVersionDLLCrystal Modulo 256 .
iVersionDLLCrystal = major + (minor / 10) .
End.
/* Once we have the Crystal Version */
cSource = ("C:\MyDirectory\" + "MyFile.txt" ).
set-size (mPointerSource) = 1024 .
if iVersionDLLCrystal >= 9 Then /* Crystal Version 9 or Higher */
Put-String (mPointerSource, 1) = chr(14) + chr(14) + "MyFile.txt".
else
Put-String (mPointerSource, 1) = cSource . /* Crystal Version 8 */
Run PESetNthTableLocation (Input iNumeroJob,
Input (iCompteur - 1),
Input mPointerSource,
OutPut iCodeRetour) .