Clarion 9 apps using Report to PDF to require C++ redistributable?

There's a thread in the Clarion 9 newsgroup that seems to confirm that if you're using the ReportToPDF functionality in Clarion 9, any such apps will need to also have the Microsoft Visual C++ 2005 Redistributable installed on that machine. 

The tricky thing is that your apps may run fine on your test machines because you have the 2005 Redistrutable, but then things blow up when you ship product to your customers. 

Here's a post by L Jack Wilson on the subject:

Geert,

I imagine the PNG support requires ClaRunExt.dll, since libmaker reports it contains:
?ImageToPNG1@@YAJPBD@Z
?ImageToPNG2@@YAJPBD@Z
?RotateFlip@@YAJPBD@Z
?SaveThumbnail@@YAJPBD@Z


Have you tested your app on a machine that doesn't have Clarion 9 IDE installed? I too use the ReportToPDF and noticed I need to have the ClaRunExt.dll in my program directory or my main exe will not load.

I also found with a fresh install of my program on a Windows 7 32-bit box I could not launch an app that requires ClaRunExt.dll to be present without also installing Microsoft Visual C++ 2005 Redistributable - KB2467175 8.0.51011. This same redistributable is installed by the Clarion 9.0.10294 installer. Without that installed any programs that required ClaRunExt.dll would fail to run with a 0xc0150002 error.

Using dependency walker on ClaRunExt.dll tells me it requires the side-by-side "stuff" that the redistributable installs (along with the other ms dlls). 

In reply, Diego said:

Hi,

All that Jack is saying is correct.

Regards,
Diego Borojovich
www.Softvelocity.com

If it's the PNG support that triggers this, then perhaps any use of PNG files will require the C++ redistributable. 

Graham Dawson wondered how to check for an existing installation of the redistributable. Richard Rose pointed out a couple of registry keys (the 2005 package is the one Clarion apps need):

  • VC++2005 (SP1): HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\B25099274A207264182F8181ADD555D0
  • VC++2008 (sp1): HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3D696B-0DB7-3C6D-A356-3DB8CE541918}
  • VC++2008 (original): HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}

The easiest way to deal with this seems to be to build your installs with LinderSoft's SetupBuilder, which can install the 2005 redistributable if it isn't already present. Yes, SetupBuilder is an additional cost but if you ship product it's almost certainly a wise investment even without this feature. 

Update: Confirmation by Bob Z

Bob Zaunere has confirmed the above requirements:

In the current C9 release you do need 2 things when distributing your program;

1. installation of the the 2005 VC++ runtime (x86), *note: in the next release 
(today or tomorrow),you will not need it _unless you are using the PDF Report 
Generator, and then _only _if you are using the new "Use Scan Copy Mode" 
option, which by default is OFF.  

2. ClaRunExt.dll (located in the Clarion BIN folder)

If you use SetupBuilder the install of the VC++ runtime (x86) is all handled by 
a checkbox located under: Setup Requirements->Core PreRequisites.
We'll also be shipping a redistributable .exe that will handle the install of 
the VC++ runtime (x86) for those who may deploy via .zip or .rar

Note the phrase "current c9 release" - in future releases the runtime will only need to be installed if you are using the PDF Report Generator and specifically using the new "Use Scan Copy Mode". 

Update: More details on the "scan copy" innards, from Diego:

Deeply inside is converting the report to a png of some resolution and color 
deep to be able to keep the
information of the report (font,images, resolution, content ,etc) exactly the same.
With out hte need of embebing the Fonts or to support any other images formats 
and adding security to the content (a PDF is just text when not compressed and 
encripted)
Estern char sets now can be used in the PDF with out having to store the fonts 
or have the Font in the user.
With out that option the PDF engine process the report and re-create the report 
in PDF format, but not always the result is 100% exactly but using this option 
the print out of one and the other are 99.98% a match.

Graham Dawson has confirmed that when you use Scan Copy you do in fact get a PDF that is composed of images only and contains no searchable text. 

Update: ClaRunExt.dll now dynamically loaded

As of build 10309 ClaRunExt.dll is no longer statically linked. From a post by Bob Z:

That .lib file is not needed because there is no static linking to 
Clarunext.dll - its been changed to a runtime dynamic load that only
happens _if you are using the new 'Scan copy mode', so if your .app/project is 
looking for it then either;
- its a leftover project reference from when it was a static link, and you can 
just delete it
- you are using the IP driver in this .app (an update will be out today that 
removes its linking to clarunext
- you don't have or are not using the latest templates; core (EE) or PDF if running PE