Mercurial > hg > xemacs-beta
diff src/win32.c @ 531:0493e9f3c27f
[xemacs-hg @ 2001-05-12 11:16:12 by ben]
event-msw.c: eliminate cygwin warnings.
dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x.
find-paths.el: fix error with null EXCLUDE-REGEXP.
font-lock.el: fix problem reported by hrvoje with buffers starting with a space.
lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'.
etags.c: new version from Francesco.
Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author | ben |
---|---|
date | Sat, 12 May 2001 11:16:25 +0000 |
parents | abe6d1db359e |
children | 183866b06e0b |
line wrap: on
line diff
--- a/src/win32.c Fri May 11 05:49:46 2001 +0000 +++ b/src/win32.c Sat May 12 11:16:25 2001 +0000 @@ -62,6 +62,25 @@ (LPCWSTR, DWORD, SHFILEINFOW FAR *, UINT, UINT); pfSHGetFileInfoW_t xSHGetFileInfoW; +typedef NET_API_STATUS (NET_API_FUNCTION *pfNetUserEnum_t) + ( + IN LPCWSTR servername OPTIONAL, + IN DWORD level, + IN DWORD filter, + OUT LPBYTE *bufptr, + IN DWORD prefmaxlen, + OUT LPDWORD entriesread, + OUT LPDWORD totalentries, + IN OUT LPDWORD resume_handle OPTIONAL + ); +pfNetUserEnum_t xNetUserEnum; + +typedef NET_API_STATUS (NET_API_FUNCTION *pfNetApiBufferFree_t) + ( + IN LPVOID Buffer + ); +pfNetApiBufferFree_t xNetApiBufferFree; + Lisp_Object tstr_to_local_file_format (Extbyte *pathout) { @@ -81,6 +100,8 @@ HMODULE h_user = GetModuleHandle ("user32"); HMODULE h_gdi = GetModuleHandle ("gdi32"); HMODULE h_shell = GetModuleHandle ("shell32"); + /* the following does not seem to get mapped in automatically */ + HMODULE h_netapi = LoadLibrary ("netapi32.dll"); if (h_kernel) { @@ -123,6 +144,14 @@ xSHGetFileInfoW = (pfSHGetFileInfoW_t) GetProcAddress (h_shell, "SHGetFileInfoW"); } + + if (h_netapi) + { + xNetUserEnum = + (pfNetUserEnum_t) GetProcAddress (h_netapi, "NetUserEnum"); + xNetApiBufferFree = + (pfNetApiBufferFree_t) GetProcAddress (h_netapi, "NetApiBufferFree"); + } } DEFUN ("mswindows-shell-execute", Fmswindows_shell_execute, 2, 4, 0, /*