Sep.13.2016 -- CAlive to allow auto-creation of iCAlive_dll_role_call() for exports

8 views
Skip to first unread message

Rick C. Hodgin

unread,
Sep 13, 2016, 1:06:07 PM9/13/16
to CAlive Programming Language
CAlive will allow the auto-creation of an iCAlive_dll_role_call() function designed to provide details about public exports contained within the DLL.

This feature is disabled by default, but can be setup through link-time flags to convey no (the default), minimal, limited, extended, or full information.

Minimal will only convey names.
Limited will convey minimal + fundamental type sizes.
Extended will convey limited + real type names.
Full will convey extended + real variable names and any included documentation or notes given by the function author.

The returned datum will be a text-based human readable and parsable structure that may be multi-line, containing information about everything that exists.  An optional filter will only include those things which contain the filter expression in their output, such as "_getAs_" to look for conversion functions that exist in the DLL named "iWhatever_getAs_s32()", and so on.

    // Logical function definition
    function iCAlive_dll_role_call
    |params s32 nIndex, s32 scope = 4, datum filter
    |returns datum info
    {
        // Code to create and populate info goes here
       
// For scope: 1=minimal, 2=limited, 3=extended, 4=full
    }

    // Usage:
    handle = LoadLibrary("path/to/the.dll")
    if (handle)
    {
        // Load all details about the DLL
        if (datum info = iCAlive_dll_role_call(handle, index, scope))
            printf("%s\n", info.data);
    }

CAlive will auto-dispatch into the indicated DLL handle and retrieve the iCAlive_dll_role_call() function, and obtain all relevant information.  If that function does not exist, it will wrap to a handler which returns a null pointer.  If the requested scope is beyond the features of the information included in the role call at link time, then a note will be pre-pended indicating the same, and whatever the maximum level available is will be provided.

Note:  CAlive will provide helper functions to extract items out of the generated context via iteration.

Best regards,
Rick C. Hodgin

Reply all
Reply to author
Forward
0 new messages