Dynamic Loading

Dll Tag To Type

lgo_DllTagToType()

Converts a DLL tag to the corresonding type.

Syntax
#include "laygodll.h"

LBoolean lgo_DllTagToType
    (
         LaygoDllTag       tag,
         LaygoDllType *    type
    );
tagtag to convert
typeoutput for the type
Description

lgo_DllTagToType()converts a DLL tag to the corresonding type.

Return Values

lgo_DllTagToType()returns TRUE if the tag is converted. FALSE otherwise.

See Also

lgo_DllDescription()
lgo_DllErrorMessage()
lgo_DllName()
lgo_DllType()

Example
LaygoDllType    dllType;
LResult         result;

if (argc > 1)
{
    if (!lgo_DllTagToType(argv[1], &dllType))
    {
        printf("\nSyntax: laygodllt [" lgo_DLL_TAG_STRING "]\n");
        exit(EXIT_FAILURE);
    }
}

if ((result = lgo_LoadLaygoDll(dllType)) < 0)
{
    printf("Error: Cannot load %s LayGO API Library (%s): %s.\n",
                lgo_DllDescription(dllType),
                lgo_DllName(dllType),
                lgo_DllErrorMessage(result));
}
else
{
    printf("%s LayGO API Library loaded.\n", lgo_DllDescription(dllType));
}