Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 2027 DLL Caused an Exception
Message
De
12/02/2014 01:39:05
 
 
À
11/02/2014 17:52:40
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:
01594115
Vues:
178
Thanks Sir, Althogh Try Catch has solved my problem. But the trick you have suggested may be useful to enhance the performance of conversion.

Thanks to All


>Depending on how the DLL is constructed, there may be a trick you can try:
>
>
C:\mydir\> COPY ps2PDF.dll ps2PDF_1.dll
>1 file(s) copied
>C:\mydir\> COPY ps2PDF.dll ps2PDF_2.dll
>1 file(s) copied
>C:\mydir\> COPY ps2PDF.dll ps2PDF_3.dll
>1 file(s) copied
>C:\mydir\> COPY ps2PDF.dll ps2PDF_4.dll
>1 file(s) copied
>C:\mydir\> _
>
>
>And then in your application, based on whichever thread you are in, declare the appropriate copy as your source. That may allow them to work simultaneously. It depends on how the inner workings of the DLL operate.
>
>Hope this helps.
>
>
>>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
>>
>>
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform