programs: Build the programs that support it with -DWINE_NO_UNICODE_MACROS.

This commit is contained in:
Alexandre Julliard 2008-09-03 11:30:44 +02:00
parent e1c9c2597a
commit b66685cdd8
39 changed files with 55 additions and 34 deletions

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -35,8 +35,8 @@ static void launch(const char *what)
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszCmdLine, INT nCmdShow)
{
char szParams[255];
lstrcpy(szParams, lpszCmdLine);
CharUpper(szParams);
strcpy(szParams, lpszCmdLine);
CharUpperA(szParams);
/* no parameters - pop up whole "Control Panel" by default */
if (!*szParams) {

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -155,12 +155,12 @@ int main(int argc, char *argv[])
OFSTRUCT ofin, ofout;
LONG error;
if ((hin = LZOpenFile( infile, &ofin, OF_READ )) < 0)
if ((hin = LZOpenFileA( infile, &ofin, OF_READ )) < 0)
{
fprintf( stderr, "%s: can't open input file %s\n", argv[0], infile );
return 1;
}
if ((hout = LZOpenFile( outfile, &ofout, OF_CREATE | OF_WRITE )) < 0)
if ((hout = LZOpenFileA( outfile, &ofout, OF_CREATE | OF_WRITE )) < 0)
{
LZClose( hin );
fprintf( stderr, "%s: can't open output file %s\n", argv[0], outfile );

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -109,7 +109,7 @@ static void create_tooltip(struct icon *icon)
tooltips_initialized = TRUE;
}
icon->tooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,
icon->tooltip = CreateWindowExW(WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL,
WS_POPUP | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
@ -351,7 +351,7 @@ static BOOL handle_incoming(HWND hwndSource, COPYDATASTRUCT *cds)
int ret = FALSE;
if (cds->cbData < NOTIFYICONDATAW_V1_SIZE) return FALSE;
cbSize = ((PNOTIFYICONDATA)cds->lpData)->cbSize;
cbSize = ((PNOTIFYICONDATAW)cds->lpData)->cbSize;
if (cbSize < NOTIFYICONDATAW_V1_SIZE) return FALSE;
ZeroMemory(&nid, sizeof(nid));
@ -544,7 +544,7 @@ void initialize_systray(void)
{
HMODULE x11drv;
SIZE size;
WNDCLASSEX class;
WNDCLASSEXW class;
static const WCHAR classname[] = {'S','h','e','l','l','_','T','r','a','y','W','n','d',0};
static const WCHAR winname[] = {'W','i','n','e',' ','S','y','s','t','e','m',' ','T','r','a','y',0};
@ -561,12 +561,12 @@ void initialize_systray(void)
class.style = CS_DBLCLKS;
class.lpfnWndProc = tray_wndproc;
class.hInstance = NULL;
class.hIcon = LoadIcon(0, IDI_WINLOGO);
class.hCursor = LoadCursor(0, IDC_ARROW);
class.hIcon = LoadIconW(0, (LPCWSTR)IDI_WINLOGO);
class.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
class.hbrBackground = (HBRUSH) COLOR_WINDOW;
class.lpszClassName = (WCHAR *) &classname;
if (!RegisterClassEx(&class))
if (!RegisterClassExW(&class))
{
WINE_ERR("Could not register SysTray window class\n");
return;

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -28,7 +28,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmds
HMODULE hModule;
DOWINMAIN *doWinMain;
hModule = LoadLibrary("hhctrl.ocx");
hModule = LoadLibraryA("hhctrl.ocx");
doWinMain = (DOWINMAIN*) GetProcAddress(hModule, "doWinMain");
return doWinMain(hInst, cmdline);

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -344,14 +344,14 @@ static DWORD DoRegServer(void)
CHAR path[MAX_PATH+12];
DWORD ret = 0;
scm = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CREATE_SERVICE);
scm = OpenSCManagerA(NULL, SERVICES_ACTIVE_DATABASEA, SC_MANAGER_CREATE_SERVICE);
if (!scm)
{
fprintf(stderr, "Failed to open the service control manager.\n");
return 1;
}
GetSystemDirectory(path, MAX_PATH);
GetSystemDirectoryA(path, MAX_PATH);
lstrcatA(path, "\\msiexec.exe /V");
service = CreateServiceA(scm, "MSIServer", "MSIServer", GENERIC_ALL,

View File

@ -132,7 +132,7 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
UpdateSCMStatus(SERVICE_START_PENDING, NO_ERROR, 0);
kill_event = CreateEvent(0, TRUE, FALSE, 0);
kill_event = CreateEventW(0, TRUE, FALSE, 0);
if (!kill_event)
{
fprintf(stderr, "Failed to create event\n");
@ -156,7 +156,7 @@ DWORD DoService(void)
{
char service_name[] = "MSIServer";
const SERVICE_TABLE_ENTRY service[] =
const SERVICE_TABLE_ENTRYA service[] =
{
{service_name, ServiceMain},
{NULL, NULL},
@ -164,7 +164,7 @@ DWORD DoService(void)
WINE_TRACE("Starting MSIServer service\n");
if (!StartServiceCtrlDispatcher(service))
if (!StartServiceCtrlDispatcherA(service))
{
fprintf(stderr, "Failed to start MSIServer service\n");
return 1;

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -86,7 +86,7 @@ static VOID *LoadProc(const char* strDll, const char* procName, HMODULE* DllHand
{
VOID* (*proc)(void);
*DllHandle = LoadLibraryEx(strDll, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
*DllHandle = LoadLibraryExA(strDll, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
if(!*DllHandle)
{
if(!Silent)

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -96,7 +96,7 @@ static void fatal_string_error(int which, DWORD error_code)
{
WCHAR msg[2048];
if (!LoadStringW(GetModuleHandle(NULL), which,
if (!LoadStringW(GetModuleHandleW(NULL), which,
msg, sizeof(msg)/sizeof(WCHAR)))
WINE_ERR("LoadString failed, error %d\n", GetLastError());
@ -107,7 +107,7 @@ static void fatal_string(int which)
{
WCHAR msg[2048];
if (!LoadStringW(GetModuleHandle(NULL), which,
if (!LoadStringW(GetModuleHandleW(NULL), which,
msg, sizeof(msg)/sizeof(WCHAR)))
WINE_ERR("LoadString failed, error %d\n", GetLastError());
@ -262,7 +262,7 @@ int wmain (int argc, WCHAR *argv[])
char* multibyte_unixpath;
int multibyte_unixpath_len;
wine_get_dos_file_name_ptr = (void*)GetProcAddress(GetModuleHandle("KERNEL32"), "wine_get_dos_file_name");
wine_get_dos_file_name_ptr = (void*)GetProcAddress(GetModuleHandleA("KERNEL32"), "wine_get_dos_file_name");
if (!wine_get_dos_file_name_ptr)
fatal_string(STRING_UNIXFAIL);

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -227,7 +227,7 @@ static LRESULT send_messages_with_timeout_dialog(
}
else if ((ret == WAIT_TIMEOUT) && !hwnd_endtask)
{
hwnd_endtask = CreateDialogParamW( GetModuleHandle(NULL),
hwnd_endtask = CreateDialogParamW( GetModuleHandleW(NULL),
MAKEINTRESOURCEW(IDD_ENDTASK),
NULL, endtask_dlg_proc,
(LPARAM)&dlg_data );

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -284,9 +284,9 @@ static WCHAR *get_url_from_dde(void)
while (!ddeString)
{
MSG msg;
if (!GetMessage(&msg, NULL, 0, 0)) break;
if (!GetMessageW(&msg, NULL, 0, 0)) break;
if (msg.message == WM_TIMER) break;
DispatchMessage(&msg);
DispatchMessageW(&msg);
}
if (ddeString)
@ -381,7 +381,7 @@ int wmain(int argc, WCHAR *argv[])
/* check if the argument is a local file */
wine_get_unix_file_name_ptr = (wine_get_unix_file_name_t)
GetProcAddress( GetModuleHandle( "KERNEL32" ), "wine_get_unix_file_name" );
GetProcAddress( GetModuleHandleA( "KERNEL32" ), "wine_get_unix_file_name" );
if (wine_get_unix_file_name_ptr == NULL)
{

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -155,7 +155,7 @@ int wmain(int argc, const WCHAR *argv[])
if (outputformats & UNIXFORMAT) {
wine_get_unix_file_name_ptr = (void*)
GetProcAddress(GetModuleHandle("KERNEL32"),
GetProcAddress(GetModuleHandleA("KERNEL32"),
"wine_get_unix_file_name");
if (wine_get_unix_file_name_ptr == NULL) {
fprintf(stderr, "%s: cannot get the address of "
@ -166,7 +166,7 @@ int wmain(int argc, const WCHAR *argv[])
if (outputformats & WINDOWSFORMAT) {
wine_get_dos_file_name_ptr = (void*)
GetProcAddress(GetModuleHandle("KERNEL32"),
GetProcAddress(GetModuleHandleA("KERNEL32"),
"wine_get_dos_file_name");
if (wine_get_dos_file_name_ptr == NULL) {
fprintf(stderr, "%s: cannot get the address of "

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -218,7 +218,7 @@ static VOID pif_cmd( char *filename, char *cmdline)
if( (p = strrchr( progname, '.')) && !strcasecmp( p, ".bat"))
WINE_FIXME(".bat programs in pif files are not supported.\n");
/* first change dir, so the search below can start from there */
if( startdir[0] && !SetCurrentDirectory( startdir)) {
if( startdir[0] && !SetCurrentDirectoryA( startdir)) {
WINE_ERR("Cannot change directory %s\n", wine_dbgstr_a( startdir));
sprintf( buf, "%s\nInvalid startup directory. Check your pif file.",
filename);

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -23,9 +23,5 @@
int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
{
return ShellAbout(NULL, PACKAGE_NAME, PACKAGE_STRING, 0);
return ShellAboutA(NULL, PACKAGE_NAME, PACKAGE_STRING, 0);
}
/* Local Variables: */
/* c-files style: "GNU" */
/* End: */

View File

@ -1,3 +1,4 @@
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -40,7 +40,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
lstrcatW(path, SZ_BACKSLASH);
lstrcatW(path, SZ_WORDPAD);
stinf.cb = sizeof(STARTUPINFO);
stinf.cb = sizeof(STARTUPINFOW);
GetStartupInfoW(&stinf);
if (!CreateProcessW(path, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &stinf, &info))
@ -48,7 +48,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
return 0;
failed:
LoadStringW(GetModuleHandle(NULL), IDS_FAILED, path, MAX_PATH);
LoadStringW(GetModuleHandleW(NULL), IDS_FAILED, path, MAX_PATH);
MessageBoxW(NULL, path, NULL, MB_OK|MB_ICONERROR);
return 1;
}