Demo version - is it expected to get exceptions in the dll ?

  • Using the demo version of the dll and creating windows of class "WPCubed_PDFVIEW_Demo_01" from a single executable, often, after a first window had been created, showed, used and then destroyed, a second CreateWindowEx crashes in wPDFViewDemo02.dll!119fea60().

    Is there any demo-related limitation or mechanism that could interfere with successfully creating a viewer, closing it, re-creating a new one ? (My app opens a window to show a pdf - just built on the fly -, then the user close the window and a new window can re-open to show a new pdf.

    Thanks,

  • I can add that it looks like always on processing a WM_NCCREATE. It does not *always* happen, but often, and most of the time when I create a new viewer after having closed a previous one. When it happens it is while the DLL Wndproc is processing a WM_NCCREATE message.

  • Okay, found what happens.
    It is not possible to:

    LoadLibrary();
    Create a windows of class WPCubed_PDFVIEW_Demo_01
    Use it (success)
    Close/Destroy the window
    FreeLibrary()

    then start again:
    LoadLibrary()
    Create a wind... bang! crash processing WM_NCCREATE inside the DLL.

    I have worked around it by calling LoadLibrary once at start of executable. It deserves a fix anyway, I think. I can test an updated build if you like, when you're ready.

    • Offizieller Beitrag

    Hi,

    Zitat

    It is not possible to:

    LoadLibrary();
    Create a windows of class WPCubed_PDFVIEW_Demo_01
    Use it (success)
    Close/Destroy the window
    FreeLibrary()

    No, this is NOT possible.

    The DLL must be loaded once and then kept in memory. This is usual for DLLs which register a window class, such as the RichEdit.DLL.


    Julian