Lines 34-101
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Link Here
|
34 |
|
34 |
|
35 |
#else |
35 |
#else |
36 |
|
36 |
|
|
|
37 |
#ifndef __GLOBUS_H |
38 |
#include "globus.h" |
39 |
#endif |
40 |
|
41 |
#ifdef __WINDUMMY__ |
42 |
#define WINDUMMY_FUNC FUN_EXPO |
43 |
#else |
44 |
#define WINDUMMY_FUNC FUN_IMPO |
45 |
#endif |
46 |
|
37 |
#include<wchar.h> |
47 |
#include<wchar.h> |
38 |
|
48 |
|
39 |
int LoadString(HINSTANCE hInstance, UINT uID, LPTSTR lpBuffer, int nBufferMax); |
49 |
WINDUMMY_FUNC(int) LoadString(HINSTANCE hInstance, UINT uID, LPTSTR lpBuffer, int nBufferMax); |
40 |
|
50 |
|
41 |
int CreateDirectory(const char *dir, void *dummy); |
51 |
WINDUMMY_FUNC(int) CreateDirectory(const char *dir, void *dummy); |
42 |
DWORD GetTempPath(DWORD nBufferLength, LPTSTR lpBuffer); |
52 |
WINDUMMY_FUNC(DWORD) GetTempPath(DWORD nBufferLength, LPTSTR lpBuffer); |
43 |
int RemoveDirectory(const char *d); |
53 |
WINDUMMY_FUNC(int) RemoveDirectory(const char *d); |
44 |
void* GlobalAlloc(UINT uFlags, int dwBytes); |
54 |
WINDUMMY_FUNC(void*) GlobalAlloc(UINT uFlags, int dwBytes); |
45 |
HGLOBAL GlobalFree(void *f); |
55 |
WINDUMMY_FUNC(HGLOBAL) GlobalFree(void *f); |
46 |
void* GlobalReAlloc(void* hMem, int dwBytes, UINT uFlags); |
56 |
WINDUMMY_FUNC(void*) GlobalReAlloc(void* hMem, int dwBytes, UINT uFlags); |
47 |
int GetTempFileName(LPCTSTR lpPathName, LPCTSTR lpPrefixString, |
57 |
WINDUMMY_FUNC(int) GetTempFileName(LPCTSTR lpPathName, LPCTSTR lpPrefixString, |
48 |
UINT uUnique, LPTSTR lpTempFileName); |
58 |
UINT uUnique, LPTSTR lpTempFileName); |
49 |
int GetLastError(); |
59 |
WINDUMMY_FUNC(int) GetLastError(); |
50 |
|
60 |
|
51 |
DWORD GetModuleFileName(HMODULE hModule, LPTSTR lpFilename, DWORD nSize); |
61 |
WINDUMMY_FUNC(DWORD) GetModuleFileName(HMODULE hModule, LPTSTR lpFilename, DWORD nSize); |
52 |
BOOL CloseHandle(HANDLE hObject); |
62 |
WINDUMMY_FUNC(BOOL) CloseHandle(HANDLE hObject); |
53 |
HANDLE CreateFile(LPCTSTR lpFileName, DWORD dwDesiredAccess, |
63 |
WINDUMMY_FUNC(HANDLE) CreateFile(LPCTSTR lpFileName, DWORD dwDesiredAccess, |
54 |
DWORD dwShareMode, void* lpSecurityAttributes, |
64 |
DWORD dwShareMode, void* lpSecurityAttributes, |
55 |
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); |
65 |
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); |
56 |
|
66 |
|
57 |
HWND FindWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName); |
67 |
WINDUMMY_FUNC(HWND) FindWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName); |
58 |
UINT RegisterWindowMessage(LPCTSTR lpString); |
68 |
WINDUMMY_FUNC(UINT) RegisterWindowMessage(LPCTSTR lpString); |
59 |
|
69 |
|
60 |
int _findclose(long handle); |
70 |
WINDUMMY_FUNC(int) _findclose(long handle); |
61 |
long _findfirst(const char *filespec, struct _finddata_t *fileinfo); |
71 |
WINDUMMY_FUNC(long) _findfirst(const char *filespec, struct _finddata_t *fileinfo); |
62 |
int _findnext(long handle, struct _finddata_t *fileinfo); |
72 |
WINDUMMY_FUNC(int) _findnext(long handle, struct _finddata_t *fileinfo); |
63 |
long _tell(int handle); |
73 |
WINDUMMY_FUNC(long) _tell(int handle); |
64 |
|
74 |
|
65 |
BOOL GetComputerName(LPTSTR lpBuffer, long unsigned int *lpnSize); |
75 |
WINDUMMY_FUNC(BOOL) GetComputerName(LPTSTR lpBuffer, long unsigned int *lpnSize); |
66 |
|
76 |
|
67 |
LONG RegOpenKeyEx(HKEY hKey, LPCTSTR lpSubKey, DWORD ulOptions, |
77 |
WINDUMMY_FUNC(LONG) RegOpenKeyEx(HKEY hKey, LPCTSTR lpSubKey, DWORD ulOptions, |
68 |
REGSAM samDesired, PHKEY phkResult); |
78 |
REGSAM samDesired, PHKEY phkResult); |
69 |
LONG RegQueryValueEx(HKEY hKey, LPCTSTR lpValueName, |
79 |
WINDUMMY_FUNC(LONG) RegQueryValueEx(HKEY hKey, LPCTSTR lpValueName, |
70 |
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, |
80 |
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, |
71 |
LPDWORD lpcbData); |
81 |
LPDWORD lpcbData); |
72 |
|
82 |
|
73 |
BOOL GetClientRect(HWND hWnd, LPRECT lpRect); |
83 |
WINDUMMY_FUNC(BOOL) GetClientRect(HWND hWnd, LPRECT lpRect); |
74 |
BOOL WritePrivateProfileString(LPCTSTR lpAppName, |
84 |
WINDUMMY_FUNC(BOOL) WritePrivateProfileString(LPCTSTR lpAppName, |
75 |
LPCTSTR lpKeyName, LPCTSTR lpString, LPCTSTR lpFileName); |
85 |
LPCTSTR lpKeyName, LPCTSTR lpString, LPCTSTR lpFileName); |
76 |
DWORD GetPrivateProfileString(LPCTSTR lpAppName, LPCTSTR lpKeyName, |
86 |
WINDUMMY_FUNC(DWORD) GetPrivateProfileString(LPCTSTR lpAppName, LPCTSTR lpKeyName, |
77 |
LPCTSTR lpDefault, LPTSTR lpReturnedString, DWORD nSize, LPCTSTR lpFileName); |
87 |
LPCTSTR lpDefault, LPTSTR lpReturnedString, DWORD nSize, LPCTSTR lpFileName); |
78 |
UINT GetPrivateProfileInt(LPCTSTR lpAppName, |
88 |
WINDUMMY_FUNC(UINT) GetPrivateProfileInt(LPCTSTR lpAppName, |
79 |
LPCTSTR lpKeyName, INT nDefault, LPCTSTR lpFileName); |
89 |
LPCTSTR lpKeyName, INT nDefault, LPCTSTR lpFileName); |
80 |
|
90 |
|
81 |
int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, const wchar_t *lpWideCharStr, |
91 |
WINDUMMY_FUNC(int) WideCharToMultiByte(UINT CodePage, DWORD dwFlags, const wchar_t *lpWideCharStr, |
82 |
int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, |
92 |
int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, |
83 |
LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar); |
93 |
LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar); |
84 |
|
94 |
|
85 |
BOOL ShowWindow(HWND hWnd, int nCmdShow); |
95 |
WINDUMMY_FUNC(BOOL) ShowWindow(HWND hWnd, int nCmdShow); |
86 |
|
96 |
|
87 |
long _filelength(int fd); |
97 |
WINDUMMY_FUNC(long) _filelength(int fd); |
88 |
long _msize(void *memblock); |
98 |
WINDUMMY_FUNC(long) _msize(void *memblock); |
89 |
int _access(const char *filename, int mode); |
99 |
WINDUMMY_FUNC(int) _access(const char *filename, int mode); |
90 |
BOOL SetWindowText(HWND hWnd,LPCTSTR lpString); |
100 |
WINDUMMY_FUNC(BOOL) SetWindowText(HWND hWnd,LPCTSTR lpString); |
91 |
int ReleaseDC(HWND hWnd, HDC hDC); |
101 |
WINDUMMY_FUNC(int) ReleaseDC(HWND hWnd, HDC hDC); |
92 |
BOOL IsIconic(HWND hWnd); |
102 |
WINDUMMY_FUNC(BOOL) IsIconic(HWND hWnd); |
93 |
HDC GetDC(HWND hWnd); |
103 |
WINDUMMY_FUNC(HDC) GetDC(HWND hWnd); |
94 |
BOOL EndPaint(HWND hWnd, ...); |
104 |
WINDUMMY_FUNC(BOOL) EndPaint(HWND hWnd, ...); |
95 |
HDC BeginPaint(HWND hwnd,...); |
105 |
WINDUMMY_FUNC(HDC) BeginPaint(HWND hwnd,...); |
96 |
LRESULT SendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); |
106 |
WINDUMMY_FUNC(LRESULT) SendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); |
97 |
void strlwr(char *foo); |
107 |
WINDUMMY_FUNC(void) strlwr(char *foo); |
98 |
HWND CreateWindow( |
108 |
WINDUMMY_FUNC(HWND) CreateWindow( |
99 |
LPCTSTR lpClassName, |
109 |
LPCTSTR lpClassName, |
100 |
LPCTSTR lpWindowName, |
110 |
LPCTSTR lpWindowName, |
101 |
DWORD dwStyle, |
111 |
DWORD dwStyle, |
Lines 109-170
HWND CreateWindow(
Link Here
|
109 |
LPVOID lpParam |
119 |
LPVOID lpParam |
110 |
); |
120 |
); |
111 |
|
121 |
|
112 |
HGDIOBJ SelectObject(HDC hdc, HGDIOBJ hgdiobj); |
122 |
WINDUMMY_FUNC(HGDIOBJ) SelectObject(HDC hdc, HGDIOBJ hgdiobj); |
113 |
LPTSTR lstrcat(LPTSTR lpString1, LPTSTR lpString2); |
123 |
WINDUMMY_FUNC(LPTSTR) lstrcat(LPTSTR lpString1, LPTSTR lpString2); |
114 |
int lstrlen(LPCTSTR lpString); |
124 |
WINDUMMY_FUNC(int) lstrlen(LPCTSTR lpString); |
115 |
int lstrcmp(LPCTSTR lpString1, LPCTSTR lpString2); |
125 |
WINDUMMY_FUNC(int) lstrcmp(LPCTSTR lpString1, LPCTSTR lpString2); |
116 |
LPTSTR lstrcpy(LPTSTR lpString1, LPCTSTR lpString2); |
126 |
WINDUMMY_FUNC(LPTSTR) lstrcpy(LPTSTR lpString1, LPCTSTR lpString2); |
117 |
int wsprintf(LPTSTR lpOut, LPCTSTR lpFmt, ...); |
127 |
WINDUMMY_FUNC(int) wsprintf(LPTSTR lpOut, LPCTSTR lpFmt, ...); |
118 |
int lstrcmpi(LPCTSTR lpString1, LPCTSTR lpString2); |
128 |
WINDUMMY_FUNC(int) lstrcmpi(LPCTSTR lpString1, LPCTSTR lpString2); |
119 |
|
129 |
|
120 |
BOOL DeleteObject(HGDIOBJ hObject); |
130 |
WINDUMMY_FUNC(BOOL) DeleteObject(HGDIOBJ hObject); |
121 |
|
131 |
|
122 |
#define GetGValue(rgb) ((BYTE) (((WORD) (rgb)) >> 8)) |
132 |
#define GetGValue(rgb) ((BYTE) (((WORD) (rgb)) >> 8)) |
123 |
#define GetBValue(rgb) ((BYTE) ((rgb) >> 16)) |
133 |
#define GetBValue(rgb) ((BYTE) ((rgb) >> 16)) |
124 |
#define GetRValue(rgb) ((BYTE) (rgb)) |
134 |
#define GetRValue(rgb) ((BYTE) (rgb)) |
125 |
|
135 |
|
126 |
HWND GetFocus(); |
136 |
WINDUMMY_FUNC(HWND) GetFocus(); |
127 |
int MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); |
137 |
WINDUMMY_FUNC(int) MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); |
128 |
|
138 |
|
129 |
int WINAPI GlobalSize(HGLOBAL hMem); |
139 |
WINDUMMY_FUNC(int) WINAPI GlobalSize(HGLOBAL hMem); |
130 |
LPVOID GlobalLock(HGLOBAL hMem); |
140 |
WINDUMMY_FUNC(LPVOID) GlobalLock(HGLOBAL hMem); |
131 |
BOOL GlobalUnlock(HGLOBAL hMem); |
141 |
WINDUMMY_FUNC(BOOL) GlobalUnlock(HGLOBAL hMem); |
132 |
BOOL IsBadWritePtr(LPVOID lp, int ucb); |
142 |
WINDUMMY_FUNC(BOOL) IsBadWritePtr(LPVOID lp, int ucb); |
133 |
void OutputDebugString(LPCTSTR lpOutputString); |
143 |
WINDUMMY_FUNC(void) OutputDebugString(LPCTSTR lpOutputString); |
134 |
BOOL SetRect(LPRECT lprc, int xLeft, int yTop, |
144 |
WINDUMMY_FUNC(BOOL) SetRect(LPRECT lprc, int xLeft, int yTop, |
135 |
int xRight, int yBottom); |
145 |
int xRight, int yBottom); |
136 |
BOOL PtInRect(const RECT *lprc, POINT pt); |
146 |
WINDUMMY_FUNC(BOOL) PtInRect(const RECT *lprc, POINT pt); |
137 |
BOOL IntersectRect(LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2); |
147 |
WINDUMMY_FUNC(BOOL) IntersectRect(LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2); |
138 |
BOOL UnionRect(LPRECT lprcDst, const RECT *lprcSrc1,const RECT *lprcSrc2); |
148 |
WINDUMMY_FUNC(BOOL) UnionRect(LPRECT lprcDst, const RECT *lprcSrc1,const RECT *lprcSrc2); |
139 |
|
149 |
|
140 |
HWND GetActiveWindow(); |
150 |
WINDUMMY_FUNC(HWND) GetActiveWindow(); |
141 |
HFONT CreateFont(int nHeight, int nWidth, int nEscapement, |
151 |
WINDUMMY_FUNC(HFONT) CreateFont(int nHeight, int nWidth, int nEscapement, |
142 |
int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline, |
152 |
int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline, |
143 |
DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, |
153 |
DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, |
144 |
DWORD fdwClipPrecision, DWORD fdwQuality, DWORD fdwPitchAndFamily, |
154 |
DWORD fdwClipPrecision, DWORD fdwQuality, DWORD fdwPitchAndFamily, |
145 |
LPCTSTR lpszFace); |
155 |
LPCTSTR lpszFace); |
146 |
BOOL GetTextExtentPoint32(HDC hdc, LPCTSTR lpString, int c, LPSIZE lpSize); |
156 |
WINDUMMY_FUNC(BOOL) GetTextExtentPoint32(HDC hdc, LPCTSTR lpString, int c, LPSIZE lpSize); |
147 |
BOOL EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam); |
157 |
WINDUMMY_FUNC(BOOL) EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam); |
148 |
int GetWindowText(HWND hWnd, LPTSTR lpString, int nMaxCount); |
158 |
WINDUMMY_FUNC(int) GetWindowText(HWND hWnd, LPTSTR lpString, int nMaxCount); |
149 |
|
159 |
|
150 |
HMODULE LoadLibrary(LPCTSTR lpFileName); |
160 |
WINDUMMY_FUNC(HMODULE) LoadLibrary(LPCTSTR lpFileName); |
151 |
BOOL FreeLibrary(HMODULE hModule); |
161 |
WINDUMMY_FUNC(BOOL) FreeLibrary(HMODULE hModule); |
152 |
void* GetProcAddress(HMODULE hModule, LPCSTR lpProcName); |
162 |
WINDUMMY_FUNC(void*) GetProcAddress(HMODULE hModule, LPCSTR lpProcName); |
153 |
|
163 |
|
154 |
HGDIOBJ GetStockObject(int fnObject); |
164 |
WINDUMMY_FUNC(HGDIOBJ) GetStockObject(int fnObject); |
155 |
BOOL IsWindowVisible(HWND hWnd); |
165 |
WINDUMMY_FUNC(BOOL) IsWindowVisible(HWND hWnd); |
156 |
LRESULT DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, |
166 |
WINDUMMY_FUNC(LRESULT) DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, |
157 |
LPARAM lParam); |
167 |
LPARAM lParam); |
158 |
LONG GetWindowLong(HWND hWnd, int nIndex); |
168 |
WINDUMMY_FUNC(LONG) GetWindowLong(HWND hWnd, int nIndex); |
159 |
BOOL RegisterClass(const WNDCLASS *lpWndClass); |
169 |
WINDUMMY_FUNC(BOOL) RegisterClass(const WNDCLASS *lpWndClass); |
160 |
HMODULE GetModuleHandle(LPCTSTR lpModuleName); |
170 |
WINDUMMY_FUNC(HMODULE) GetModuleHandle(LPCTSTR lpModuleName); |
161 |
HICON LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName); |
171 |
WINDUMMY_FUNC(HICON) LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName); |
162 |
|
172 |
|
163 |
long filelength(int fd); |
173 |
WINDUMMY_FUNC(long) filelength(int fd); |
164 |
int LoadCursor(HINSTANCE hInstance, LPCTSTR lpCursorName); |
174 |
WINDUMMY_FUNC(int) LoadCursor(HINSTANCE hInstance, LPCTSTR lpCursorName); |
165 |
BOOL Rectangle(HDC hdc, |
175 |
WINDUMMY_FUNC(BOOL) Rectangle(HDC hdc, |
166 |
int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); |
176 |
int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); |
167 |
char* _strupr(char*s); |
177 |
WINDUMMY_FUNC(char*) _strupr(char*s); |
168 |
|
178 |
|
169 |
#endif /* not WIN32 */ |
179 |
#endif /* not WIN32 */ |
170 |
|
180 |
|
Lines 176-197
char* _strupr(char*s);
Link Here
|
176 |
extern "C" { |
186 |
extern "C" { |
177 |
#endif |
187 |
#endif |
178 |
|
188 |
|
179 |
int open_data_file(const char *basename, int mode); |
189 |
WINDUMMY_FUNC(int) open_data_file(const char *basename, int mode); |
180 |
int data_file_exists(const char *basename); |
190 |
WINDUMMY_FUNC(int) data_file_exists(const char *basename); |
181 |
|
191 |
|
182 |
void split_path(const char *fname, |
192 |
WINDUMMY_FUNC(void) split_path(const char *fname, |
183 |
char *file_path, |
193 |
char *file_path, |
184 |
char *basename, |
194 |
char *basename, |
185 |
char *ext); |
195 |
char *ext); |
186 |
|
196 |
|
187 |
void make_path(char *opath, |
197 |
WINDUMMY_FUNC(void) make_path(char *opath, |
188 |
const char *dir, |
198 |
const char *dir, |
189 |
const char *basename, |
199 |
const char *basename, |
190 |
const char *ext); |
200 |
const char *ext); |
191 |
|
201 |
|
192 |
void winpath_to_internal(char *p); |
202 |
WINDUMMY_FUNC(void) winpath_to_internal(char *p); |
193 |
|
203 |
|
194 |
unsigned int curr_dir(unsigned int bsize, char* buf); |
204 |
WINDUMMY_FUNC(unsigned int) curr_dir(unsigned int bsize, char* buf); |
195 |
|
205 |
|
196 |
#ifdef __cplusplus |
206 |
#ifdef __cplusplus |
197 |
} |
207 |
} |