* autoload.cc: New file keeping all autoload stuff.

* Makefile.in: Add autoload.o to dependencies.
        * dcrt0.cc: Move all autoload stuff to autoload.cc.
        * fhandler_mem.cc: Ditto.
        * net.cc: Ditto.
        * uinfo.cc: Ditto.
This commit is contained in:
Corinna Vinschen
2000-10-27 18:53:56 +00:00
parent 018a91fa2e
commit a5cc215f75
7 changed files with 326 additions and 329 deletions

View File

@@ -14,7 +14,6 @@ details. */
#include <winnls.h>
#include <utmp.h>
#include <limits.h>
#include "autoload.h"
#include <stdlib.h>
#include <wchar.h>
#include <lm.h>
@@ -252,26 +251,3 @@ cuserid (char *src)
return getlogin ();
}
}
extern "C" {
LoadDLLinitfunc (netapi32)
{
HANDLE h;
if ((h = LoadLibrary ("netapi32.dll")) != NULL)
netapi32_handle = h;
else if (! netapi32_handle)
api_fatal ("could not load netapi32.dll. %d", GetLastError ());
return 0;
}
static void dummy_autoload (void) __attribute__ ((unused));
static void
dummy_autoload (void)
{
LoadDLLinit (netapi32)
LoadDLLfunc (NetWkstaUserGetInfo, 12, netapi32)
LoadDLLfunc (NetUserGetInfo, 16, netapi32)
LoadDLLfunc (NetApiBufferFree, 4, netapi32)
}
}