Logo Search packages:      
Sourcecode: gsoap version File versions

static const char* SoapSharedLibrary_load ( SoapSharedLibrary This,
apr_pool_t *  pTempPool 
) [static]

Parameters:
pTempPool pool to use for allocating temporary objects (e.g. error message).

Definition at line 170 of file mod_gsoap.c.

References SoapSharedLibrary_S::m_hLibrary, SoapSharedLibrary_S::m_pPool, and SoapSharedLibrary_S::m_pszPath.

Referenced by SoapSharedLibraries_loadAllLibraries().

                                                                                         {
    const char *pszError = NULL;
#ifdef WIN32
      This->m_hLibrary  = DLOPEN(This->m_pszPath);

      if (!This->m_hLibrary)
      {
            LPVOID lpMsgBuf;

            FormatMessage(  FORMAT_MESSAGE_ALLOCATE_BUFFER | 
                                    FORMAT_MESSAGE_FROM_SYSTEM | 
                                    FORMAT_MESSAGE_IGNORE_INSERTS,
                                    NULL,
                                    GetLastError(),
                                    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
                                    (LPTSTR) &lpMsgBuf,
                                    0,
                                    NULL );
            pszError = apr_psprintf(NULL == pTempPool ? This->m_pPool : pTempPool, "Load of %s failed with %s", This->m_pszPath, lpMsgBuf );
            LocalFree(lpMsgBuf);

      }
#else
    const int nFlags = RTLD_LAZY | RTLD_GLOBAL;
    This->m_hLibrary = (void *)DLOPEN(This->m_pszPath, nFlags);
      pszError = dlerror();
#endif
    if (NULL == This->m_hLibrary) 
      {
            pszError = apr_psprintf(NULL == pTempPool ? This->m_pPool : pTempPool, "mod_gsoap: %s loading library %s", pszError, This->m_pszPath);
    }

    return pszError;
}


Generated by  Doxygen 1.6.0   Back to index