api/c/tests/dlopen/indigo-test-dlopen.c
HANDLE dlOpenWithCheck(const char* libraryPath)
{
    HANDLE handle = DLOPEN(libraryPath);
#ifdef _WIN32
    /* On Windows error code is returned by LoadLibrary() and can be between 0 and 31 */
    if (handle < (HANDLE)32)
    {
        printf("Error in LoadLibrary. Error code: %p\n", handle);
        return NULL;
    }
#else
    if (!handle)
    {
        printf("Error in dlopen: %s\n", dlerror());
        return NULL;
    }
#endif
    return handle;
}
/* Try to dynamically load library and check load status. */
Try to dynamically load library and check load status.
Try to dynamically load library and check load status .
HANDLE dlOpenWithCheck(const char* libraryPath)
{
    HANDLE handle = DLOPEN(libraryPath);
#ifdef _WIN32
    if (handle < (HANDLE)32)
    {
        printf("Error in LoadLibrary. Error code: %p\n", handle);
        return NULL;
    }
#else
    if (!handle)
    {
        printf("Error in dlopen: %s\n", dlerror());
        return NULL;
    }
#endif
    return handle;
}
HANDLE dlOpenWithCheck ( const char * libraryPath ) { HANDLE handle = DLOPEN ( libraryPath ) ; #ifdef _WIN32 if ( handle < ( HANDLE ) 32 ) { printf ( " \n " , handle ) ; return NULL ; } #else if ( ! handle ) { printf ( " \n " , dlerror ( ) ) ; return NULL ; } #endif return handle ; }
Try to dynamically load library and check load status.
Try to dynamically load library and check load status .
/* On Windows error code is returned by LoadLibrary() and can be between 0 and 31 */