pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dynamic_load.c,v 1.95 2008/05/30 16:00:48 mast Exp $ + || $Id: dynamic_load.c,v 1.96 2009/03/19 10:16:38 grubba Exp $   */      #ifdef TESTING   #define NO_PIKE_INCLUDES   #define CREATE_MAIN   #define NO_PIKE_GUTS   #endif      #ifndef NO_PIKE_INCLUDES   # include "global.h"
pike.git/src/dynamic_load.c:101: Inside #if defined(HAVE_SOME_DLOPEN)
   HINSTANCE ret;    tmp=convert_string(foo, strlen(foo));    ret=LoadLibrary(tmp);    free((char *)tmp);    return (void *)ret;   }      static char * dlerror(void)   {    static char buffer[200]; +  int err = GetLastError(); +  switch(err) { +  case ERROR_MOD_NOT_FOUND: +  return "The specified module could not be found."; +  default:    sprintf(buffer,"LoadLibrary failed with error: %d",GetLastError()); -  +  }    return buffer;   }      static void *dlsym(void *module, char * function)   {    return (void *)GetProcAddress((HMODULE)module,    function);   }      static void dlclose(void *module)