1 /* 2 Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization 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 private methods. 17 */ 18 #ifndef MAGICKCORE_NT_BASE_PRIVATE_H 19 #define MAGICKCORE_NT_BASE_PRIVATE_H 20 21 #include "MagickCore/delegate.h" 22 #include "MagickCore/delegate-private.h" 23 #include "MagickCore/exception.h" 24 #include "MagickCore/splay-tree.h" 25 26 #if defined(__cplusplus) || defined(c_plusplus) 27 extern "C" { 28 #endif 29 30 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 31 32 #if !defined(XS_VERSION) 33 struct dirent 34 { 35 char 36 d_name[2048]; 37 38 int 39 d_namlen; 40 }; 41 42 typedef struct _DIR 43 { 44 HANDLE 45 hSearch; 46 47 WIN32_FIND_DATAW 48 Win32FindData; 49 50 BOOL 51 firsttime; 52 53 struct dirent 54 file_info; 55 } DIR; 56 57 typedef struct _NTMEMORYSTATUSEX 58 { 59 DWORD 60 dwLength, 61 dwMemoryLoad; 62 63 DWORDLONG 64 ullTotalPhys, 65 ullAvailPhys, 66 ullTotalPageFile, 67 ullAvailPageFile, 68 ullTotalVirtual, 69 ullAvailVirtual, 70 ullAvailExtendedVirtual; 71 } NTMEMORYSTATUSEX; 72 73 #if !defined(__MINGW32__) && !defined(__MINGW64__) 74 struct timezone 75 { 76 int 77 tz_minuteswest, 78 tz_dsttime; 79 }; 80 #endif 81 82 typedef UINT 83 (CALLBACK *LPFNDLLFUNC1)(DWORD,UINT); 84 85 typedef UINT 86 (CALLBACK *LPFNDLLFUNC2)(NTMEMORYSTATUSEX *); 87 88 #endif 89 90 #if defined(MAGICKCORE_BZLIB_DELEGATE) 91 # if defined(_WIN32) 92 # define BZ_IMPORT 1 93 # endif 94 #endif 95 96 extern MagickPrivate char 97 *NTGetLastError(void); 98 99 #if !defined(MAGICKCORE_LTDL_DELEGATE) 100 extern MagickPrivate const char 101 *NTGetLibraryError(void); 102 #endif 103 104 #if !defined(XS_VERSION) 105 extern MagickPrivate const char 106 *NTGetLibraryError(void); 107 108 extern MagickPrivate DIR 109 *NTOpenDirectory(const char *); 110 111 extern MagickPrivate double 112 NTElapsedTime(void), 113 NTErf(double), 114 NTUserTime(void); 115 116 extern MagickPrivate int 117 Exit(int), 118 #if !defined(__MINGW32__) && !defined(__MINGW64__) 119 gettimeofday(struct timeval *,struct timezone *), 120 #endif 121 IsWindows95(void), 122 NTCloseDirectory(DIR *), 123 NTCloseLibrary(void *), 124 NTControlHandler(void), 125 NTExitLibrary(void), 126 NTTruncateFile(int,off_t), 127 NTGhostscriptDLL(char *,int), 128 NTGhostscriptEXE(char *,int), 129 NTGhostscriptFonts(char *,int), 130 NTGhostscriptLoadDLL(void), 131 NTInitializeLibrary(void), 132 NTSetSearchPath(const char *), 133 NTSyncMemory(void *,size_t,int), 134 NTUnmapMemory(void *,size_t), 135 NTSystemCommand(const char *,char *); 136 137 extern MagickPrivate ssize_t 138 NTSystemConfiguration(int), 139 NTTellDirectory(DIR *); 140 141 extern MagickPrivate MagickBooleanType 142 NTGatherRandomData(const size_t,unsigned char *), 143 NTGetExecutionPath(char *,const size_t), 144 NTGetModulePath(const char *,char *), 145 NTReportEvent(const char *,const MagickBooleanType), 146 NTReportException(const char *,const MagickBooleanType); 147 148 extern MagickPrivate struct dirent 149 *NTReadDirectory(DIR *); 150 151 extern MagickPrivate unsigned char 152 *NTRegistryKeyLookup(const char *), 153 *NTResourceToBlob(const char *); 154 155 extern MagickPrivate void 156 *NTGetLibrarySymbol(void *,const char *), 157 NTInitializeWinsock(MagickBooleanType), 158 *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType), 159 *NTOpenLibrary(const char *), 160 NTSeekDirectory(DIR *,ssize_t), 161 NTWindowsGenesis(void), 162 NTWindowsTerminus(void); 163 164 #endif /* !XS_VERSION */ 165 166 #endif /* MAGICKCORE_WINDOWS_SUPPORT */ 167 168 #if defined(__cplusplus) || defined(c_plusplus) 169 } 170 #endif /* !C++ */ 171 172 #endif /* !MAGICKCORE_NT_BASE_H */ 173