Using PDFNet sdk from Borland C++ Builder (BDS2006).

Q: I have some issues using PDFNet sdk from Borland C++ Builder

Whenever I call the PDFNet::SetResourcesPath function it fails with
error "Buffer size is
negative". Please let me know if your sdk works with Borland compiler
as it looks like there are some issues with strings passed to the sdk
functions using the wrappers provided or maybe I'm doing something
wrong. I can link the sdk to my application just fine and use the
functions just like they are used in the sdk demos but
SetResourcesPath fails with the above message and if I try to paint a
page on a DC with PDFDraw::DrawInRect without calling
SetResourcesPath first (with pdfnet.res file in the same folder as the
application and library) it will rise the exception message "Searching
for 'pdfnet.res'. Use PDFNet::SetResourcePath() to set the correct
path.". If I
call PDFNet::GetResourcesPath() it will return the correct folder path
of my
project files and where "pdfnet.res" file is located.

This issue looks like a Borland compiler because I've done tests with
VC2003 and I can't get the above errors.

Please let me know what can I do to use the sdk under Borland C++
compiler (BDS2006)
A: PDFNet SDK should also work with 'Borland C++' and other C++
compilers (besides VC++ compilers). This seems like a bug in Borland C+
+. As a workaround your can call SetResourcePath as follows:

pdftron::UString res(path, strlen(path), UString::e_ascii_enc);