Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
530:c948643d954f | 531:0493e9f3c27f |
---|---|
60 pfSHGetFileInfoA_t xSHGetFileInfoA; | 60 pfSHGetFileInfoA_t xSHGetFileInfoA; |
61 typedef DWORD (WINAPI *pfSHGetFileInfoW_t) | 61 typedef DWORD (WINAPI *pfSHGetFileInfoW_t) |
62 (LPCWSTR, DWORD, SHFILEINFOW FAR *, UINT, UINT); | 62 (LPCWSTR, DWORD, SHFILEINFOW FAR *, UINT, UINT); |
63 pfSHGetFileInfoW_t xSHGetFileInfoW; | 63 pfSHGetFileInfoW_t xSHGetFileInfoW; |
64 | 64 |
65 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetUserEnum_t) | |
66 ( | |
67 IN LPCWSTR servername OPTIONAL, | |
68 IN DWORD level, | |
69 IN DWORD filter, | |
70 OUT LPBYTE *bufptr, | |
71 IN DWORD prefmaxlen, | |
72 OUT LPDWORD entriesread, | |
73 OUT LPDWORD totalentries, | |
74 IN OUT LPDWORD resume_handle OPTIONAL | |
75 ); | |
76 pfNetUserEnum_t xNetUserEnum; | |
77 | |
78 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetApiBufferFree_t) | |
79 ( | |
80 IN LPVOID Buffer | |
81 ); | |
82 pfNetApiBufferFree_t xNetApiBufferFree; | |
83 | |
65 Lisp_Object | 84 Lisp_Object |
66 tstr_to_local_file_format (Extbyte *pathout) | 85 tstr_to_local_file_format (Extbyte *pathout) |
67 { | 86 { |
68 Bufbyte *ttlff; | 87 Bufbyte *ttlff; |
69 Lisp_Object in; | 88 Lisp_Object in; |
79 { | 98 { |
80 HMODULE h_kernel = GetModuleHandle ("kernel32"); | 99 HMODULE h_kernel = GetModuleHandle ("kernel32"); |
81 HMODULE h_user = GetModuleHandle ("user32"); | 100 HMODULE h_user = GetModuleHandle ("user32"); |
82 HMODULE h_gdi = GetModuleHandle ("gdi32"); | 101 HMODULE h_gdi = GetModuleHandle ("gdi32"); |
83 HMODULE h_shell = GetModuleHandle ("shell32"); | 102 HMODULE h_shell = GetModuleHandle ("shell32"); |
103 /* the following does not seem to get mapped in automatically */ | |
104 HMODULE h_netapi = LoadLibrary ("netapi32.dll"); | |
84 | 105 |
85 if (h_kernel) | 106 if (h_kernel) |
86 { | 107 { |
87 xSwitchToThread = | 108 xSwitchToThread = |
88 (pfSwitchToThread_t) GetProcAddress (h_kernel, "SwitchToThread"); | 109 (pfSwitchToThread_t) GetProcAddress (h_kernel, "SwitchToThread"); |
121 xSHGetFileInfoA = | 142 xSHGetFileInfoA = |
122 (pfSHGetFileInfoA_t) GetProcAddress (h_shell, "SHGetFileInfoA"); | 143 (pfSHGetFileInfoA_t) GetProcAddress (h_shell, "SHGetFileInfoA"); |
123 xSHGetFileInfoW = | 144 xSHGetFileInfoW = |
124 (pfSHGetFileInfoW_t) GetProcAddress (h_shell, "SHGetFileInfoW"); | 145 (pfSHGetFileInfoW_t) GetProcAddress (h_shell, "SHGetFileInfoW"); |
125 } | 146 } |
147 | |
148 if (h_netapi) | |
149 { | |
150 xNetUserEnum = | |
151 (pfNetUserEnum_t) GetProcAddress (h_netapi, "NetUserEnum"); | |
152 xNetApiBufferFree = | |
153 (pfNetApiBufferFree_t) GetProcAddress (h_netapi, "NetApiBufferFree"); | |
154 } | |
126 } | 155 } |
127 | 156 |
128 DEFUN ("mswindows-shell-execute", Fmswindows_shell_execute, 2, 4, 0, /* | 157 DEFUN ("mswindows-shell-execute", Fmswindows_shell_execute, 2, 4, 0, /* |
129 Get Windows to perform OPERATION on DOCUMENT. | 158 Get Windows to perform OPERATION on DOCUMENT. |
130 This is a wrapper around the ShellExecute system function, which | 159 This is a wrapper around the ShellExecute system function, which |