+ wxCHECK_MSG( IsLoaded(), NULL,
+ _T("Can't load symbol from unloaded library") );
+
+ bool failed = FALSE;
+ void *symbol = 0;
+
+ wxUnusedVar(symbol);
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+ Ptr symAddress;
+ CFragSymbolClass symClass;
+ Str255 symName;
+#if TARGET_CARBON
+ c2pstrcpy( (StringPtr) symName, name.fn_str() );
+#else
+ strcpy( (char *)symName, name.fn_str() );
+ c2pstr( (char *)symName );
+#endif
+ if( FindSymbol( m_handle, symName, &symAddress, &symClass ) == noErr )
+ symbol = (void *)symAddress;
+
+#elif defined(__WXPM__) || defined(__EMX__)
+ DosQueryProcAddr( m_handle, 1L, name.c_str(), (PFN*)symbol );
+
+#elif defined(HAVE_DLOPEN) || defined(__DARWIN__)
+ symbol = dlsym( m_handle, name.fn_str() );
+
+#elif defined(HAVE_SHL_LOAD)
+ // use local variable since shl_findsym modifies the handle argument
+ // to indicate where the symbol was found (GD)
+ wxDllType the_handle = m_handle;
+ if( shl_findsym( &the_handle, name.fn_str(), TYPE_UNDEFINED, &symbol ) != 0 )
+ symbol = 0;
+
+#elif defined(__WINDOWS__)
+#ifdef __WXWINCE__
+ symbol = (void*) ::GetProcAddress( m_handle, name );
+#else
+ symbol = (void*) ::GetProcAddress( m_handle, name.mb_str() );
+#endif