DLL

Translated Document

  • This document has been translated from the original Japanese by members of the Ukagaka Dream Team community.
  • To see the original document, click here.
  • To submit corrections/updates, see our repository to open an issue or find where to contact us.
  • Last updated:

    Preface

    This section summarizes the specifications required for DLL files, which are the core of each subsystem, including SHIORI, SAORI, MAKOTO, PLUGIN, and HEADLINE.

    Export Functions

    Here is an example in C.

    ☆Borland C/C++ compilers seem to add an underscore at the beginning like _load, so it would be better to support that as well.

    load

    HGLOBAL contains the path to the directory containing the DLL.
    Since it is GlobalAlloc(GMEM_FIXED,xxx), please cast it to a pointer (char *) and use it as is.
    Also, be sure to perform GlobalFree on the DLL side.

    The return value is always true.
    The default is false on load failure, but if false is returned, nothing is processed.

    unload

    Called just before opening the DLL (i.e., when SSP/CROW is closed & when overwriting installs, before DLL_PROCESS_DETACH).

    The return value is always true.
    The default is false on release failure, but if false is returned, it is ignored.

    request

    All processing other than loading and unloading is performed here.
    The precautions are the same as for load.

    The return value depends on the type of subsystem (SHIORI, SAORI, PLUGIN...) implemented by this DLL.
    The return value HGLOBAL should also be the one allocated by GlobalAlloc(GMEM_FIXED,xxx).