BatchConvertEx() Compile Error

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
brianp
Posts: 10
Joined: Thu Oct 16 2003

BatchConvertEx() Compile Error

Post by brianp »

I am receiving the following error when I use BatchConvertEx() function. If I remove it then it compiles fine. Here is the error message:

error LNK2001: unresolved external symbol _BatchConvertEx@8

Here is a snippet of my code. I have the developer version of Document Converter 2.10e.

#include "CDIntf210.h"
....
HANDLE hPrinter = PDFDriverInit(szPrinter);
EnablePrinter(hPrinter, "Company", "key");
SetDefaultPrinter(hPrinter);
SetFileNameOptions(hPrinter, NoPrompt);
SetDefaultDirectory(hPrinter, "C:\\Temp");
SetDefaultFileName(hPrinter, "C:\\Temp\\Test.pdf");

BatchConvertEx(hPrinter, "C:\\Temp\\*.xls");


Any help would be greatly appreciated.
Thanks,
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Under which operating system are you getting this error?

Did you try to use BatchConvert instead of BatchConvertEx ?
brianp
Posts: 10
Joined: Thu Oct 16 2003

BatchConvertEx Compile Error

Post by brianp »

I' am using Windows 2000 with VC++ 6. I didn't see the declarations for just BatchConvert() in the developers manual. Does it take the same parameters?

Thanks,
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

BatchConvert is used in the ActiveX interface of CDintf and BatchConvertEx is used in the DLL interface.

They are both mentioned in the Developers' manual, you will find information about BatchConvert on page 145.

After rechecking your code I don't think it is an issue whether you use BatchConvert or BatchConverEx.

I tried to use BatchConert from VB and I didn't get any error message. Please send your code to canada.support@amyuni.com so we can try to reproduce this issue from C++.

I guess you may be using an older version of CDintf with version 2.10e of the PDF Converter, please check that you only one version of CDintf210.dll on your sytem and that it is the latest one.

Hope this helps.
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

Post by Dany »

There's a problem with the file CDINTF.H that is posted on the web site.
BatchConvertEx should be declared as:
long WINAPI BatchConvertEx( HANDLE hPrinter, LPSTR szFileName );

This explains the linker error that you are getting.
brianp
Posts: 10
Joined: Thu Oct 16 2003

BatchConvertEx() Compile Error

Post by brianp »

Hey thanks, I tried using the new declaration but no dice same problem. Is there another location that I can get the header file and library from? Any additional help would be greatly appreciated. I' m thinking you received my code, so we're you able to produce a successful compile? Do you have a C++ sample that uses the similiar functions as my program and if so could you send me that with the files that you used.

Thanks,
brianp
Posts: 10
Joined: Thu Oct 16 2003

Post by brianp »

Can you provide an example and the code (.lib and .h) files that you use in your example? I can't get around this link error for BatchConvertEx(). I have sent the code that I was using but I never heard back whether or not you got it to work correctly. The suggestion on the board about the wrong declaration did not work. Any help would be greatly appreciated.
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

Post by Dany »

Please note that we have updated the full CDINTF package at:
http://www.amyuni.com/downloads/cdintf210.zip

The version online is 2.10f and the .h, .lib and .DLL are now in sync so that you will not face any problems.
brianp
Posts: 10
Joined: Thu Oct 16 2003

Post by brianp »

Just wanted to thank everyone for their help. The new .lib and .h files that you posted solved the problem. :lol:
Post Reply