View Single Post
  #1  
Old 10-19-2009, 12:19 PM
amraist
Fire Beetle
 
Join Date: Aug 2005
Posts: 29
Default

Actually my first patch is ok, but this is probably a better one.
Code:
@@ -83,10 +83,10 @@
                return(NULL);

        void *r = GetProcAddress(hDLL, name);
-
-       if(GetError() != NULL)
-               r = NULL;
-
+       if ( r == NULL ) {
+               const char *load_error = GetError();
+               fprintf(stderr, "[Error] Shared Library GetSym: '%s' failed.  Error=%s\n", name, load_error?load_error:"Null Return, no error");
+       }
        return(r);
 }
Reply With Quote