Here's a simple test case, which fails on sparc (compile with g++ test.cxx -lpt):
---------8<---------- #include <stdio.h> #include <ptlib.h> int main() { PDynaLink *dll = new PDynaLink("/usr/lib/pwlib/1.11.2/device/videoinput/v4l_pwplugin.so"); unsigned (*GetAPIVersion)(); if (dll->GetFunction("PWLibPlugin_GetAPIVersion", (PDynaLink::Function &)GetAPIVersion)) { printf("TRUE GetAPIVersion=%p\n", GetAPIVersion); } else { printf("FALSE GetAPIVersion=%p\n", GetAPIVersion); } } ---------8<---------- When run on sparc, it gives: TRUE GetAPIVersion=(nil) which is pretty surprising, given that the code of GetFunction reads: BOOL PDynaLink::GetFunction(const PString & fn, Function & func) { if (dllHandle == NULL) return FALSE; #if defined(P_OPENBSD) void * p = dlsym(dllHandle, (char *)(const char *)fn); #else void * p = dlsym(dllHandle, (const char *)fn); #endif if (p == NULL) return FALSE; func = (Function &)p; return TRUE; } i.e. there appears to be no way for it to return TRUE and set the function pointer to NULL simultaneously. For comparison, on my 386 box it returns TRUE GetAPIVersion=0xb72eecec as expected. Cheers. -- Jurij Smakov [EMAIL PROTECTED] Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]