first checked in. may have bugs

This commit is contained in:
ehouse 2006-01-28 18:58:04 +00:00
parent 0693777599
commit df51f38946
2 changed files with 92 additions and 0 deletions

52
wince/debhacks.c Normal file
View file

@ -0,0 +1,52 @@
#ifdef USE_DEB_HACKS
#include "xptypes.h"
#include "debhacks.h"
wchar_t*
DH(lstrcat)(wchar_t *s1, const wchar_t* s2)
{
return wcscat( s1, s2 );
}
wchar_t*
DH(lstrcpy)(wchar_t* dest, const wchar_t* src)
{
return wcscpy( dest, src );
}
int
DH(DialogBoxParam)( HINSTANCE hinst, LPCWSTR name, HWND hwnd,
DLGPROC proc, LPARAM lparam )
{
HRSRC resstr = FindResource( hinst, name, RT_DIALOG );
HGLOBAL lr = LoadResource( hinst, resstr );
return DialogBoxIndirectParamW(hinst, lr, hwnd, proc, lparam );
}
BOOL
DH(GetTextExtentPoint32)( HDC hdc, LPCWSTR str, int i, LPSIZE siz )
{
return GetTextExtentExPointW(hdc, str, i, 0, NULL, NULL, siz );
}
BOOL
DH(SetEvent)(HANDLE h)
{
return FALSE;
}
BOOL
DH(ResetEvent)(HANDLE h)
{
return FALSE;
}
DWORD
DH(GetCurrentThreadId)(void)
{
return 0;
}
#endif

40
wince/debhacks.h Normal file
View file

@ -0,0 +1,40 @@
#ifndef _DEBHACKS_H_
#define _DEBHACKS_H_
#ifdef USE_DEB_HACKS
#define MS(func) M$_##func
#define DH(func) debhack_##func
typedef struct DH(WIN32_FIND_DATA) {
DWORD dwFileAttributes;
FILETIME dh_ftCreationTime;
FILETIME dh_ftLastAccessTime;
FILETIME dh_ftLastWriteTime;
DWORD dh_nFileSizeHigh;
DWORD dh_nFileSizeLow;
DWORD dh_dwReserved1;
WCHAR cFileName[MAX_PATH];
} DH(WIN32_FIND_DATA);
wchar_t* DH(lstrcat)(wchar_t *s1, const wchar_t* s2);
wchar_t* DH(lstrcpy)(wchar_t* dest, const wchar_t* src);
int DH(DialogBoxParam)( HINSTANCE hinst, LPCWSTR str, HWND hwnd,
DLGPROC proc, LPARAM lparam );
BOOL DH(GetTextExtentPoint32)( HDC,LPCWSTR,int,LPSIZE);
DWORD DH(GetCurrentThreadId)(void);
BOOL DH(SetEvent)(HANDLE);
BOOL DH(ResetEvent)(HANDLE);
#else
#define MS(func) func
#define DH(func) func
#endif
#endif