Error loading Report in DLL - Invalid Pointer Operation

Good Day,

I have recently ported our application from XE5 to RIO. Our application is split into various DLLs. All reports are in separate DLLs.

The DLL is loaded with LoadLibrary and Freelibrary.

My problem is when the library is loaded for a second time (Load and Free the first time), I get a runtime RTL Invalid Pointer Operation error.

I have create a test app that calls a test DLL. The only units included in the uses clause is report builder units. On the second iteration the app completely crashes when I do LoadLibrary.

I am unable to debug further to see what the problem is.

Has anyone experienced something similary?


  • Hi Jacques,

    I tested the RB DLL demo and did not encounter any issues. The demo is installed to

    c:\Users\Public\Documents\RBuilder\Delphi x\Demos\DLL

    There is a CallDLL project and a FormDLL project. Have a look at the source code and comments.

    Best regards,

    Nard Moseley
    Digital Metaphors
  • Hello Nard,

    Thank you for the reply. I have revisited your demo in the directory and all is good until i start adding my runtime packages.

    I add the following as part of my list:


    I add this to the CallDll and RptDll.

    It seems OK when I only have it in the RPTdll, but as soon as I have it in both it becomes a problem.

Sign In or Register to comment.