cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 7e41fe8 | 2010-12-04 23:12:08 +0000 | [diff] [blame] | 2 | Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3 | dedicated to making software imaging solutions freely available. |
| 4 | |
| 5 | You may not use this file except in compliance with the License. |
| 6 | obtain a copy of the License at |
| 7 | |
| 8 | http://www.imagemagick.org/script/license.php |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | MagickCore Windows NT utility methods. |
| 17 | */ |
| 18 | #ifndef _MAGICKCORE_NT_BASE_H |
| 19 | #define _MAGICKCORE_NT_BASE_H |
| 20 | |
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 25 | #include "MagickCore/delegate.h" |
| 26 | #include "MagickCore/delegate-private.h" |
| 27 | #include "MagickCore/exception.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 28 | |
| 29 | #define WIN32_LEAN_AND_MEAN |
| 30 | #define VC_EXTRALEAN |
| 31 | #define _CRT_SECURE_NO_DEPRECATE 1 |
| 32 | #include <windows.h> |
| 33 | #include <wchar.h> |
| 34 | #include <winuser.h> |
| 35 | #include <wingdi.h> |
| 36 | #include <io.h> |
| 37 | #include <process.h> |
| 38 | #include <errno.h> |
| 39 | #if defined(_DEBUG) && !defined(__MINGW32__) |
| 40 | #include <crtdbg.h> |
| 41 | #endif |
| 42 | |
| 43 | #define PROT_READ 0x01 |
| 44 | #define PROT_WRITE 0x02 |
| 45 | #define MAP_SHARED 0x01 |
| 46 | #define MAP_PRIVATE 0x02 |
| 47 | #define MAP_ANONYMOUS 0x20 |
| 48 | #define F_OK 0 |
| 49 | #define R_OK 4 |
| 50 | #define W_OK 2 |
| 51 | #define RW_OK 6 |
| 52 | #define _SC_PAGESIZE 1 |
| 53 | #define _SC_PHYS_PAGES 2 |
| 54 | #define _SC_OPEN_MAX 3 |
| 55 | #if !defined(SSIZE_MAX) |
| 56 | #define SSIZE_MAX 0x7fffffffL |
| 57 | #endif |
| 58 | |
| 59 | /* |
| 60 | _MSC_VER values: |
| 61 | 1100 MSVC 5.0 |
| 62 | 1200 MSVC 6.0 |
| 63 | 1300 MSVC 7.0 Visual C++ .NET 2002 |
| 64 | 1310 Visual c++ .NET 2003 |
| 65 | 1400 Visual C++ 2005 |
| 66 | 1500 Visual C++ 2008 |
| 67 | */ |
| 68 | |
| 69 | #if !defined(chsize) |
| 70 | # if defined(__BORLANDC__) |
| 71 | # define chsize(file,length) chsize(file,length) |
| 72 | # else |
| 73 | # define chsize(file,length) _chsize(file,length) |
| 74 | # endif |
| 75 | #endif |
| 76 | |
| 77 | #if !defined(access) |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 78 | #if defined(_VISUALC_) && (_MSC_VER >= 1400) |
cristy | 38d73d6 | 2011-05-19 01:55:37 +0000 | [diff] [blame] | 79 | # define access(path,mode) _access_s(path,mode) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 80 | #endif |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 81 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 82 | #if !defined(chdir) |
| 83 | # define chdir _chdir |
| 84 | #endif |
| 85 | #if !defined(close) |
| 86 | # define close _close |
| 87 | #endif |
| 88 | #if !defined(closedir) |
| 89 | # define closedir(directory) NTCloseDirectory(directory) |
| 90 | #endif |
| 91 | #if !defined(fdopen) |
| 92 | # define fdopen _fdopen |
| 93 | #endif |
| 94 | #if !defined(fileno) |
| 95 | # define fileno _fileno |
| 96 | #endif |
cristy | 9538f23 | 2011-03-29 15:07:55 +0000 | [diff] [blame] | 97 | #if !defined(fseek) && !defined(__MINGW32__) |
cristy | 32be6cf | 2011-03-29 14:53:14 +0000 | [diff] [blame] | 98 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | 785c45f | 2011-03-29 14:55:11 +0000 | [diff] [blame] | 99 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | 7f31770 | 2011-02-18 20:40:28 +0000 | [diff] [blame] | 100 | # define fseek _fseeki64 |
cristy | 9538f23 | 2011-03-29 15:07:55 +0000 | [diff] [blame] | 101 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 102 | #endif |
| 103 | #if !defined(fstat) && !defined(__BORLANDC__) |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 104 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | 785c45f | 2011-03-29 14:55:11 +0000 | [diff] [blame] | 105 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | # define fstat _fstati64 |
| 107 | #else |
| 108 | # define fstat _fstat |
| 109 | #endif |
| 110 | #endif |
| 111 | #if !defined(fsync) |
| 112 | # define fsync _commit |
| 113 | #endif |
cristy | 9538f23 | 2011-03-29 15:07:55 +0000 | [diff] [blame] | 114 | #if !defined(ftell) && !defined(__MINGW32__) |
cristy | 32be6cf | 2011-03-29 14:53:14 +0000 | [diff] [blame] | 115 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | 785c45f | 2011-03-29 14:55:11 +0000 | [diff] [blame] | 116 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | 7f31770 | 2011-02-18 20:40:28 +0000 | [diff] [blame] | 117 | # define ftell _ftelli64 |
cristy | 9538f23 | 2011-03-29 15:07:55 +0000 | [diff] [blame] | 118 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 119 | #endif |
| 120 | #if !defined(ftruncate) |
| 121 | # define ftruncate(file,length) NTTruncateFile(file,length) |
| 122 | #endif |
| 123 | #if !defined(getcwd) |
| 124 | # define getcwd _getcwd |
| 125 | #endif |
| 126 | #if !defined(getpid) |
| 127 | # define getpid _getpid |
| 128 | #endif |
| 129 | #if !defined(hypot) |
| 130 | # define hypot _hypot |
| 131 | #endif |
| 132 | #if !defined(inline) |
| 133 | # define inline __inline |
| 134 | #endif |
| 135 | #if !defined(isatty) |
| 136 | # define isatty _isatty |
| 137 | #endif |
cristy | aef5ccb | 2011-05-20 14:43:41 +0000 | [diff] [blame] | 138 | #if !defined(locale_t) |
| 139 | #define locale_t _locale_t |
| 140 | #endif |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 141 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | 785c45f | 2011-03-29 14:55:11 +0000 | [diff] [blame] | 142 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 143 | # define lseek _lseeki64 |
cristy | f9a253e | 2011-03-29 15:10:42 +0000 | [diff] [blame] | 144 | #else |
| 145 | # define lseek _lseek |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 146 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 147 | #if !defined(MAGICKCORE_LTDL_DELEGATE) |
| 148 | #if !defined(lt_dlclose) |
| 149 | # define lt_dlclose(handle) NTCloseLibrary(handle) |
| 150 | #endif |
| 151 | #if !defined(lt_dlerror) |
| 152 | # define lt_dlerror() NTGetLibraryError() |
| 153 | #endif |
| 154 | #if !defined(lt_dlexit) |
| 155 | # define lt_dlexit() NTExitLibrary() |
| 156 | #endif |
| 157 | #if !defined(lt_dlinit) |
| 158 | # define lt_dlinit() NTInitializeLibrary() |
| 159 | #endif |
| 160 | #if !defined(lt_dlopen) |
| 161 | # define lt_dlopen(filename) NTOpenLibrary(filename) |
| 162 | #endif |
| 163 | #if !defined(lt_dlsetsearchpath) |
| 164 | # define lt_dlsetsearchpath(path) NTSetSearchPath(path) |
| 165 | #endif |
| 166 | #if !defined(lt_dlsym) |
| 167 | # define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name) |
| 168 | #endif |
| 169 | #endif |
| 170 | #if !defined(mkdir) |
| 171 | # define mkdir _mkdir |
| 172 | #endif |
| 173 | #if !defined(mmap) |
| 174 | # define mmap(address,length,protection,access,file,offset) \ |
| 175 | NTMapMemory(address,length,protection,access,file,offset) |
| 176 | #endif |
| 177 | #if !defined(msync) |
| 178 | # define msync(address,length,flags) NTSyncMemory(address,length,flags) |
| 179 | #endif |
| 180 | #if !defined(munmap) |
| 181 | # define munmap(address,length) NTUnmapMemory(address,length) |
| 182 | #endif |
| 183 | #if !defined(opendir) |
| 184 | # define opendir(directory) NTOpenDirectory(directory) |
| 185 | #endif |
| 186 | #if !defined(open) |
| 187 | # define open _open |
| 188 | #endif |
| 189 | #if !defined(pclose) |
| 190 | # define pclose _pclose |
| 191 | #endif |
| 192 | #if !defined(popen) |
| 193 | # define popen _popen |
| 194 | #endif |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 195 | #if !defined(fprintf_l) |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 196 | #define fprintf_l _fprintf_s_l |
| 197 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 198 | #if !defined(read) |
| 199 | # define read _read |
| 200 | #endif |
| 201 | #if !defined(readdir) |
| 202 | # define readdir(directory) NTReadDirectory(directory) |
| 203 | #endif |
| 204 | #if !defined(seekdir) |
| 205 | # define seekdir(directory,offset) NTSeekDirectory(directory,offset) |
| 206 | #endif |
| 207 | #if !defined(setmode) |
| 208 | # define setmode _setmode |
| 209 | #endif |
cristy | 98e91bd | 2010-01-12 01:11:42 +0000 | [diff] [blame] | 210 | #if !defined(spawnvp) |
| 211 | # define spawnvp _spawnvp |
| 212 | #endif |
cristy | aef5ccb | 2011-05-20 14:43:41 +0000 | [diff] [blame] | 213 | #if !defined(strtod_l) |
| 214 | #define strtod_l _strtod_l |
| 215 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 216 | #if !defined(stat) && !defined(__BORLANDC__) |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 217 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | ad09dad | 2011-03-30 21:50:41 +0000 | [diff] [blame] | 218 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 219 | # define stat _stati64 |
| 220 | #else |
| 221 | # define stat _stat |
| 222 | #endif |
| 223 | #endif |
| 224 | #if !defined(strcasecmp) |
| 225 | # define strcasecmp _strcmpi |
| 226 | #endif |
| 227 | #if !defined(strncasecmp) |
| 228 | # define strncasecmp _strnicmp |
| 229 | #endif |
| 230 | #if !defined(sysconf) |
| 231 | # define sysconf(name) NTSystemConfiguration(name) |
| 232 | #endif |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 233 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | ad09dad | 2011-03-30 21:50:41 +0000 | [diff] [blame] | 234 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 235 | # define tell _telli64 |
cristy | f9a253e | 2011-03-29 15:10:42 +0000 | [diff] [blame] | 236 | #else |
| 237 | # define tell _tell |
cristy | ecfd724 | 2011-02-18 20:23:57 +0000 | [diff] [blame] | 238 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 239 | #if !defined(telldir) |
| 240 | # define telldir(directory) NTTellDirectory(directory) |
| 241 | #endif |
| 242 | #if !defined(tempnam) |
cristy | 38d73d6 | 2011-05-19 01:55:37 +0000 | [diff] [blame] | 243 | # define tempnam _tempnam_s |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 244 | #endif |
cristy | 5d0cd95 | 2011-05-19 21:21:41 +0000 | [diff] [blame] | 245 | #if !defined(vfprintf_l) |
cristy | aef5ccb | 2011-05-20 14:43:41 +0000 | [diff] [blame] | 246 | #define vfprintf_l _vfprintf_l |
cristy | 5d0cd95 | 2011-05-19 21:21:41 +0000 | [diff] [blame] | 247 | #endif |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 248 | #if !defined(vsnprintf) |
cristy | aef5ccb | 2011-05-20 14:43:41 +0000 | [diff] [blame] | 249 | #if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1500) |
| 250 | #define vsnprintf _vsnprintf |
cristy | 38d73d6 | 2011-05-19 01:55:37 +0000 | [diff] [blame] | 251 | #endif |
| 252 | #endif |
| 253 | #if !defined(vsnprintf_l) |
cristy | aef5ccb | 2011-05-20 14:43:41 +0000 | [diff] [blame] | 254 | #define vsnprintf_l _vsnprintf_l |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 255 | #endif |
| 256 | #if !defined(write) |
| 257 | # define write _write |
| 258 | #endif |
| 259 | #if !defined(wstat) && !defined(__BORLANDC__) |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 260 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ |
cristy | ad09dad | 2011-03-30 21:50:41 +0000 | [diff] [blame] | 261 | !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 262 | # define wstat _wstati64 |
| 263 | #else |
| 264 | # define wstat _wstat |
| 265 | #endif |
| 266 | #endif |
| 267 | |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 268 | #if defined(_MT) && defined(MAGICKCORE_WINDOWS_SUPPORT) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 269 | # define SAFE_GLOBAL __declspec(thread) |
| 270 | #else |
| 271 | # define SAFE_GLOBAL |
| 272 | #endif |
| 273 | |
| 274 | #if defined(__BORLANDC__) |
| 275 | #undef _O_RANDOM |
| 276 | #define _O_RANDOM 0 |
| 277 | #undef _O_SEQUENTIAL |
| 278 | #define _O_SEQUENTIAL 0 |
| 279 | #undef _O_SHORT_LIVED |
| 280 | #define _O_SHORT_LIVED 0 |
| 281 | #undef _O_TEMPORARY |
| 282 | #define _O_TEMPORARY 0 |
| 283 | #endif |
| 284 | |
cristy | 40e22a8 | 2011-09-08 13:47:19 +0000 | [diff] [blame] | 285 | #undef gettimeofday |
| 286 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 287 | #if !defined(XS_VERSION) |
| 288 | struct dirent |
| 289 | { |
| 290 | char |
| 291 | d_name[2048]; |
| 292 | |
| 293 | int |
| 294 | d_namlen; |
| 295 | }; |
| 296 | |
| 297 | typedef struct _DIR |
| 298 | { |
| 299 | HANDLE |
| 300 | hSearch; |
| 301 | |
| 302 | WIN32_FIND_DATA |
| 303 | Win32FindData; |
| 304 | |
| 305 | BOOL |
| 306 | firsttime; |
| 307 | |
| 308 | struct dirent |
| 309 | file_info; |
| 310 | } DIR; |
| 311 | |
| 312 | typedef struct _NTMEMORYSTATUSEX |
| 313 | { |
| 314 | DWORD |
| 315 | dwLength, |
| 316 | dwMemoryLoad; |
| 317 | |
| 318 | DWORDLONG |
| 319 | ullTotalPhys, |
| 320 | ullAvailPhys, |
| 321 | ullTotalPageFile, |
| 322 | ullAvailPageFile, |
| 323 | ullTotalVirtual, |
| 324 | ullAvailVirtual, |
| 325 | ullAvailExtendedVirtual; |
| 326 | } NTMEMORYSTATUSEX; |
| 327 | |
cristy | 9acb864 | 2010-04-24 17:12:04 +0000 | [diff] [blame] | 328 | #if !defined(__MINGW32__) |
cristy | 6d71f8d | 2010-02-28 00:46:02 +0000 | [diff] [blame] | 329 | struct timezone |
| 330 | { |
| 331 | int |
| 332 | tz_minuteswest, |
| 333 | tz_dsttime; |
| 334 | }; |
cristy | 9acb864 | 2010-04-24 17:12:04 +0000 | [diff] [blame] | 335 | #endif |
cristy | 6d71f8d | 2010-02-28 00:46:02 +0000 | [diff] [blame] | 336 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 337 | typedef UINT |
| 338 | (CALLBACK *LPFNDLLFUNC1)(DWORD,UINT); |
| 339 | |
| 340 | typedef UINT |
| 341 | (CALLBACK *LPFNDLLFUNC2)(NTMEMORYSTATUSEX *); |
| 342 | |
| 343 | #endif |
| 344 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 345 | #if defined(MAGICKCORE_BZLIB_DELEGATE) |
| 346 | # if defined(_WIN32) |
| 347 | # define BZ_IMPORT 1 |
| 348 | # endif |
| 349 | #endif |
| 350 | |
| 351 | extern MagickExport char |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 352 | *NTGetLastError(void), |
| 353 | **NTArgvToUTF8(const int argc,wchar_t **); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 354 | |
cristy | defb3f0 | 2009-09-10 02:18:35 +0000 | [diff] [blame] | 355 | extern MagickExport const GhostInfo |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 356 | *NTGhostscriptDLLVectors(void); |
| 357 | |
| 358 | #if !defined(MAGICKCORE_LTDL_DELEGATE) |
| 359 | extern MagickExport const char |
| 360 | *NTGetLibraryError(void); |
| 361 | #endif |
| 362 | |
| 363 | #if !defined(XS_VERSION) |
| 364 | extern MagickExport const char |
| 365 | *NTGetLibraryError(void); |
| 366 | |
| 367 | extern MagickExport DIR |
| 368 | *NTOpenDirectory(const char *); |
| 369 | |
| 370 | extern MagickExport double |
| 371 | NTElapsedTime(void), |
| 372 | NTUserTime(void); |
| 373 | |
| 374 | extern MagickExport int |
| 375 | Exit(int), |
cristy | 2d97aa9 | 2011-09-08 00:05:29 +0000 | [diff] [blame] | 376 | #if !defined(__MINGW32__) |
| 377 | gettimeofday(struct timeval *,struct timezone *), |
| 378 | #endif |
cristy | 139c684 | 2011-09-08 01:38:55 +0000 | [diff] [blame] | 379 | IsWindows95(void), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 380 | NTCloseDirectory(DIR *), |
| 381 | NTCloseLibrary(void *), |
| 382 | NTControlHandler(void), |
| 383 | NTExitLibrary(void), |
| 384 | NTTruncateFile(int,off_t), |
| 385 | NTGhostscriptDLL(char *,int), |
| 386 | NTGhostscriptEXE(char *,int), |
| 387 | NTGhostscriptFonts(char *,int), |
| 388 | NTGhostscriptLoadDLL(void), |
| 389 | NTGhostscriptUnLoadDLL(void), |
| 390 | NTInitializeLibrary(void), |
| 391 | NTSetSearchPath(const char *), |
| 392 | NTSyncMemory(void *,size_t,int), |
| 393 | NTUnmapMemory(void *,size_t), |
| 394 | NTSystemCommand(const char *); |
| 395 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 396 | extern MagickExport ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 397 | NTSystemConfiguration(int), |
| 398 | NTTellDirectory(DIR *); |
| 399 | |
| 400 | extern MagickExport MagickBooleanType |
| 401 | NTGatherRandomData(const size_t,unsigned char *), |
| 402 | NTGetExecutionPath(char *,const size_t), |
| 403 | NTGetModulePath(const char *,char *), |
| 404 | NTReportEvent(const char *,const MagickBooleanType), |
| 405 | NTReportException(const char *,const MagickBooleanType); |
| 406 | |
| 407 | extern MagickExport struct dirent |
| 408 | *NTReadDirectory(DIR *); |
| 409 | |
| 410 | extern MagickExport unsigned char |
| 411 | *NTRegistryKeyLookup(const char *), |
| 412 | *NTResourceToBlob(const char *); |
| 413 | |
| 414 | extern MagickExport void |
| 415 | NTErrorHandler(const ExceptionType,const char *,const char *), |
| 416 | *NTGetLibrarySymbol(void *,const char *), |
| 417 | *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType), |
| 418 | *NTOpenLibrary(const char *), |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 419 | NTSeekDirectory(DIR *,ssize_t), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 420 | NTWarningHandler(const ExceptionType,const char *,const char *); |
| 421 | |
| 422 | #endif /* !XS_VERSION */ |
| 423 | |
| 424 | #if defined(__cplusplus) || defined(c_plusplus) |
| 425 | } |
| 426 | #endif /* !C++ */ |
| 427 | |
| 428 | #endif /* !_MAGICKCORE_NT_BASE_H */ |