Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 2027 DLL Caused an Exception
Message
De
11/02/2014 10:46:59
 
 
À
10/02/2014 15:16:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01593920
Message ID:
01593998
Vues:
53
J'aime (1)
your parallel workers may try to write in the same file
I should try to do all the PS2PDF() first, then all the PDF2PS()
HTH,
SCAN && Converts PS2PDF
iFilename=ALLTRIM(Fullpath)
oFilename=ALLTRIM(Newpath)
RCNON=Recno()
Parallel.CallMethod("ps2pdf", This.Class, This.ClassLibrary,,,iFilename,oFilename,RCNON)
ENDSCAN

SCAN  && Converts PDF2PS
oFilename=ALLTRIM(Fullpath) && this may be the same file as above
iFilename=ALLTRIM(Newpath) && this may be the same file as above
RCNON=Recno()
Parallel.CallMethod("Pdf2Ps", This.Class, This.ClassLibrary,,,oFilename,iFilename,RCNON)
ENDSCAN
>Hi,
>
>Using PDF2Vec SDK I am converting PDF files to PS. Things are going fine unless I incorporate Parallel Fox.
>
>After inclusion of Parallel Fox, performance is tremendous. But I am getting Error No 2027 DLL caused an Exception.
>
>Kindly guide, how to overcome it. Is there any mistake in my code. I am Getting the above error in PDF2PS conversion and not in ps2PDF conversion.
>
>Thanks.
>
>Here is My code.
>
>
>
>
>SELECT Convert
>nRECCOUNTCONVERT=ALLTRIM(STR(RECCOUNT()))
>cRECCOUNTCONVERT=' of '+ALLTRIM(STR(RECCOUNT()))
>Local loMyObject
>loMyObject = CreateObject("MyObject")
>loMyObject.Mainprocess()
>Return
>
>DEFINE CLASS MyObject AS Custom
>PROCEDURE Mainprocess
>Local Parallel as Parallel
>Parallel = NewObject("Parallel", "ParallelFox.vcx")
>Parallel.SetWorkerCount(Parallel.CPUCount)
>Parallel.StartWorkers()
>
>SCAN && Converts PS2PDF
>iFilename=ALLTRIM(Fullpath)
>oFilename=ALLTRIM(Newpath)
>RCNON=Recno()
>Parallel.CallMethod("ps2pdf", This.Class, This.ClassLibrary,,,iFilename,oFilename,RCNON)
>ENDSCAN
>
>SCAN  && Converts PDF2PS
>oFilename=ALLTRIM(Fullpath)
>iFilename=ALLTRIM(Newpath)
>RCNON=Recno()
>Parallel.CallMethod("Pdf2Ps", This.Class, This.ClassLibrary,,,oFilename,iFilename,RCNON)
>ENDSCAN
>Parallel.Wait
>Parallel.StopWorkers()
>ENDPROC
>
>** Convert ps files to PDF Using ps2PDF.Dll
>PROCEDURE ps2PDF
>PARAMETERS iFilename,oFilename,RCNON
>DECLARE INTEGER _apCreate@0   IN ps2pdf.dll AS apCreate
>DECLARE         _apClose@4    IN ps2pdf.dll AS apClose   INTEGER id
>DECLARE INTEGER _apConvert@4  IN ps2pdf.dll AS apConvert INTEGER id
>DECLARE INTEGER _apSetFunc@24 IN ps2pdf.dll AS apSetFunc INTEGER id, INTEGER code, INTEGER nOptVal1, INTEGER nOptVal2, STRING pOptVal1, STRING pOptVal2
>DECLARE INTEGER _apGetFunc@24 IN ps2pdf.dll AS apGetFunc INTEGER id, INTEGER code, INTEGER nOptVal1, INTEGER nOptVal2, STRING pOptVal1, STRING pOptVal2
>#define AP_Set_Output     3000
>#define AP_Set_Input      3001
>id=apCreate()
>IF (id # 0)
>apSetFunc(id, AP_Set_Input , 0, 0,iFilename, 0)  &&input file.
>apSetFunc(id, AP_Set_Output, 0, 0,oFilename, 0) &&output format and file.
>apConvert(id)
>apClose(id)
>Sys(2335, 1)	&& disable unattended mode, allow UI
>WAIT WINDOW 'Converting to PDF..'+ALLTRIM(STR(RCNON)) NOWAIT
>*Worker.UpdateProgress(RECNO(), "Converting..")
>ENDIF
>ENDPROC
>
>PROCEDURE PDF2PS
>PARAMETERS oFilename,iFilename,RCNON
>Declare INTEGER VeryPDF_PDF2Vector in pdf2vec.dll String strCommandLine
>Strcmd= 'pdf2vec -$ XXXXXXXXXXXXXXXX '+CHR(34)+iFilename+CHR(34)+" "+CHR(34)+oFilename+CHR(34)
>nRet = VeryPDF_PDF2Vector(strcmd)
>Sys(2335, 1)	&& disable unattended mode, allow UI
>WAIT WINDOW 'Converting to PS..'+ALLTRIM(STR(RCNON)) NOWAIT
>RETURN
>ENDPROC
>ENDDEFINE
>
>
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform