user32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
148d3aa461
commit
9cc9236556
|
@ -4045,7 +4045,7 @@ START_TEST(loader)
|
|||
test_dll_file( "ntdll.dll", FALSE );
|
||||
test_dll_file( "kernel32.dll", TRUE );
|
||||
test_dll_file( "advapi32.dll", FALSE );
|
||||
test_dll_file( "user32.dll", TRUE );
|
||||
test_dll_file( "user32.dll", FALSE );
|
||||
/* loader test must be last, it can corrupt the internal loader state on Windows */
|
||||
test_Loader();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ IMPORTS = setupapi gdi32 version sechost advapi32 kernelbase
|
|||
EXTRAINCL = $(PNG_CFLAGS)
|
||||
DELAYIMPORTS = hid imm32 usp10
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
button.c \
|
||||
caret.c \
|
||||
|
|
|
@ -21,9 +21,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -31,7 +28,7 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winnls.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "controls.h"
|
||||
|
@ -155,7 +152,7 @@ static BOOL is_comctl32_class( const WCHAR *name )
|
|||
while (min <= max)
|
||||
{
|
||||
int res, pos = (min + max) / 2;
|
||||
if (!(res = strcmpiW( name, classesW[pos] ))) return TRUE;
|
||||
if (!(res = wcsicmp( name, classesW[pos] ))) return TRUE;
|
||||
if (res < 0) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -176,7 +173,7 @@ static BOOL is_builtin_class( const WCHAR *name )
|
|||
while (min <= max)
|
||||
{
|
||||
int res, pos = (min + max) / 2;
|
||||
if (!(res = strcmpiW( name, classesW[pos] ))) return TRUE;
|
||||
if (!(res = wcsicmp( name, classesW[pos] ))) return TRUE;
|
||||
if (res < 0) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -243,7 +240,7 @@ static BOOL set_server_info( HWND hwnd, INT offset, LONG_PTR newval, UINT size )
|
|||
static inline LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
|
||||
{
|
||||
if (IS_INTRESOURCE(classPtr->menuName)) return (LPSTR)classPtr->menuName;
|
||||
return (LPSTR)(classPtr->menuName + strlenW(classPtr->menuName) + 1);
|
||||
return (LPSTR)(classPtr->menuName + lstrlenW(classPtr->menuName) + 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -288,7 +285,7 @@ static void CLASS_SetMenuNameW( CLASS *classPtr, LPCWSTR name )
|
|||
if (!IS_INTRESOURCE(classPtr->menuName)) HeapFree( GetProcessHeap(), 0, classPtr->menuName );
|
||||
if (!IS_INTRESOURCE(name))
|
||||
{
|
||||
DWORD lenW = strlenW(name) + 1;
|
||||
DWORD lenW = lstrlenW(name) + 1;
|
||||
DWORD lenA = WideCharToMultiByte( CP_ACP, 0, name, lenW, NULL, 0, NULL, NULL );
|
||||
classPtr->menuName = HeapAlloc( GetProcessHeap(), 0, lenA + lenW*sizeof(WCHAR) );
|
||||
memcpy( classPtr->menuName, name, lenW*sizeof(WCHAR) );
|
||||
|
@ -355,7 +352,7 @@ const WCHAR *CLASS_GetVersionedName( const WCHAR *name, UINT *basename_offset, W
|
|||
return name;
|
||||
|
||||
wndclass = (struct wndclass_redirect_data *)data.lpData;
|
||||
*basename_offset = wndclass->name_len / sizeof(WCHAR) - strlenW(name);
|
||||
*basename_offset = wndclass->name_len / sizeof(WCHAR) - lstrlenW(name);
|
||||
|
||||
module = (const WCHAR *)((BYTE *)data.lpSectionBase + wndclass->module_offset);
|
||||
if (!(hmod = GetModuleHandleW( module )))
|
||||
|
@ -367,7 +364,7 @@ const WCHAR *CLASS_GetVersionedName( const WCHAR *name, UINT *basename_offset, W
|
|||
if (combined)
|
||||
{
|
||||
memcpy(combined, ret, *basename_offset * sizeof(WCHAR));
|
||||
strcpyW(&combined[*basename_offset], name);
|
||||
lstrcpyW(&combined[*basename_offset], name);
|
||||
ret = combined;
|
||||
}
|
||||
|
||||
|
@ -381,7 +378,7 @@ const WCHAR *CLASS_GetVersionedName( const WCHAR *name, UINT *basename_offset, W
|
|||
LIST_FOR_EACH( ptr, &class_list )
|
||||
{
|
||||
CLASS *class = LIST_ENTRY( ptr, CLASS, entry );
|
||||
if (strcmpiW( class->name, ret )) continue;
|
||||
if (wcsicmp( class->name, ret )) continue;
|
||||
if (!class->local || class->hInstance == hmod)
|
||||
{
|
||||
found = TRUE;
|
||||
|
@ -434,7 +431,7 @@ static CLASS *CLASS_FindClass( LPCWSTR name, HINSTANCE hinstance )
|
|||
}
|
||||
else
|
||||
{
|
||||
if (strcmpiW( class->name, name )) continue;
|
||||
if (wcsicmp( class->name, name )) continue;
|
||||
}
|
||||
if (!class->local || class->hInstance == hinstance)
|
||||
{
|
||||
|
@ -483,7 +480,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, UINT basename_offset, HINSTANCE
|
|||
classPtr->basename = classPtr->name;
|
||||
if (!classPtr->atomName && name)
|
||||
{
|
||||
strcpyW( classPtr->name, name );
|
||||
lstrcpyW( classPtr->name, name );
|
||||
classPtr->basename += basename_offset;
|
||||
}
|
||||
else GlobalGetAtomNameW( classPtr->atomName, classPtr->name, ARRAY_SIZE( classPtr->name ));
|
||||
|
@ -498,7 +495,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, UINT basename_offset, HINSTANCE
|
|||
req->client_ptr = wine_server_client_ptr( classPtr );
|
||||
req->atom = classPtr->atomName;
|
||||
req->name_offset = basename_offset;
|
||||
if (!req->atom && name) wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) );
|
||||
if (!req->atom && name) wine_server_add_data( req, name, lstrlenW(name) * sizeof(WCHAR) );
|
||||
ret = !wine_server_call_err( req );
|
||||
classPtr->atomName = reply->atom;
|
||||
}
|
||||
|
@ -805,7 +802,7 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
|
|||
{
|
||||
req->instance = wine_server_client_ptr( hInstance );
|
||||
if (!(req->atom = get_int_atom_value(className)) && className)
|
||||
wine_server_add_data( req, className, strlenW(className) * sizeof(WCHAR) );
|
||||
wine_server_add_data( req, className, lstrlenW(className) * sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req )) classPtr = wine_server_get_ptr( reply->client_ptr );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -1182,7 +1179,7 @@ INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count )
|
|||
|
||||
if (count <= 0) return 0;
|
||||
if (!GetClassNameW( hwnd, tmpbuf, ARRAY_SIZE( tmpbuf ))) return 0;
|
||||
RtlUnicodeToMultiByteN( buffer, count - 1, &len, tmpbuf, strlenW(tmpbuf) * sizeof(WCHAR) );
|
||||
RtlUnicodeToMultiByteN( buffer, count - 1, &len, tmpbuf, lstrlenW(tmpbuf) * sizeof(WCHAR) );
|
||||
buffer[len] = 0;
|
||||
return len;
|
||||
}
|
||||
|
@ -1231,7 +1228,7 @@ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
|
|||
/* Return original name class was registered with. */
|
||||
lstrcpynW( buffer, class->basename, count );
|
||||
release_class_ptr( class );
|
||||
ret = strlenW( buffer );
|
||||
ret = lstrlenW( buffer );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -23,23 +23,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
|
@ -47,7 +42,6 @@
|
|||
#include "win.h"
|
||||
|
||||
#include "wine/list.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "user_private.h"
|
||||
#include "win.h"
|
||||
#include "controls.h"
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
@ -43,7 +40,6 @@
|
|||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cursor);
|
||||
|
@ -1047,8 +1043,8 @@ done:
|
|||
release_icon_frame( info, frame );
|
||||
if (!IS_INTRESOURCE(resname))
|
||||
{
|
||||
info->resname = HeapAlloc( GetProcessHeap(), 0, (strlenW(resname) + 1) * sizeof(WCHAR) );
|
||||
if (info->resname) strcpyW( info->resname, resname );
|
||||
info->resname = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(resname) + 1) * sizeof(WCHAR) );
|
||||
if (info->resname) lstrcpyW( info->resname, resname );
|
||||
}
|
||||
else info->resname = MAKEINTRESOURCEW( LOWORD(resname) );
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
@ -37,7 +34,6 @@
|
|||
#include "ddeml.h"
|
||||
#include "win.h"
|
||||
#include "dde_private.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ddeml);
|
||||
|
@ -1662,7 +1658,7 @@ WDML_SERVER* WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTop
|
|||
WDML_IncHSZ(pInstance, hszService);
|
||||
|
||||
DdeQueryStringW(pInstance->instanceID, hszService, buf1, 256, CP_WINUNICODE);
|
||||
snprintfW(buf2, 256, fmtW, buf1, 2*sizeof(ULONG_PTR), GetCurrentProcessId());
|
||||
swprintf(buf2, 256, fmtW, buf1, 2*sizeof(ULONG_PTR), GetCurrentProcessId());
|
||||
pServer->hszServiceSpec = DdeCreateStringHandleW(pInstance->instanceID, buf2, CP_WINUNICODE);
|
||||
|
||||
pServer->atomService = WDML_MakeAtomFromHsz(pServer->hszService);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
@ -33,7 +34,6 @@
|
|||
#include "dde.h"
|
||||
#include "ddeml.h"
|
||||
#include "win.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "dde_private.h"
|
||||
|
||||
|
@ -796,7 +796,7 @@ static HDDEDATA map_W_to_A( DWORD instance, void *ptr, DWORD size )
|
|||
if (data_looks_unicode( ptr, size ))
|
||||
{
|
||||
size /= sizeof(WCHAR);
|
||||
if ((end = memchrW( ptr, 0, size ))) size = end + 1 - (const WCHAR *)ptr;
|
||||
if ((end = wmemchr( ptr, 0, size ))) size = end + 1 - (const WCHAR *)ptr;
|
||||
len = WideCharToMultiByte( CP_ACP, 0, ptr, size, NULL, 0, NULL, NULL );
|
||||
ret = DdeCreateDataHandle( instance, NULL, len, 0, 0, CF_TEXT, 0);
|
||||
WideCharToMultiByte( CP_ACP, 0, ptr, size, (char *)DdeAccessData(ret, NULL), len, NULL, NULL );
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -33,7 +30,6 @@
|
|||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "controls.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -137,13 +133,13 @@ static LRESULT DEFWND_SetTextW( HWND hwnd, LPCWSTR text )
|
|||
return 0;
|
||||
|
||||
if (!text) text = empty_string;
|
||||
count = strlenW(text) + 1;
|
||||
count = lstrlenW(text) + 1;
|
||||
|
||||
if (!(wndPtr = WIN_GetPtr( hwnd ))) return 0;
|
||||
HeapFree(GetProcessHeap(), 0, wndPtr->text);
|
||||
if ((wndPtr->text = HeapAlloc(GetProcessHeap(), 0, count * sizeof(WCHAR))))
|
||||
{
|
||||
strcpyW( wndPtr->text, text );
|
||||
lstrcpyW( wndPtr->text, text );
|
||||
SERVER_START_REQ( set_window_text )
|
||||
{
|
||||
req->handle = wine_server_user_handle( hwnd );
|
||||
|
@ -814,7 +810,7 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
{
|
||||
WND *wndPtr = WIN_GetPtr( hwnd );
|
||||
if (wndPtr && wndPtr->text)
|
||||
result = WideCharToMultiByte( CP_ACP, 0, wndPtr->text, strlenW(wndPtr->text),
|
||||
result = WideCharToMultiByte( CP_ACP, 0, wndPtr->text, lstrlenW(wndPtr->text),
|
||||
NULL, 0, NULL, NULL );
|
||||
WIN_ReleasePtr( wndPtr );
|
||||
}
|
||||
|
@ -936,7 +932,7 @@ static LPARAM DEFWND_GetTextW( WND *wndPtr, LPWSTR dest, WPARAM wParam )
|
|||
if (wndPtr->text)
|
||||
{
|
||||
lstrcpynW( dest, wndPtr->text, wParam );
|
||||
result = strlenW( dest );
|
||||
result = lstrlenW( dest );
|
||||
}
|
||||
else dest[0] = '\0';
|
||||
}
|
||||
|
@ -998,7 +994,7 @@ LRESULT WINAPI DefWindowProcW(
|
|||
case WM_GETTEXTLENGTH:
|
||||
{
|
||||
WND *wndPtr = WIN_GetPtr( hwnd );
|
||||
if (wndPtr && wndPtr->text) result = (LRESULT)strlenW(wndPtr->text);
|
||||
if (wndPtr && wndPtr->text) result = (LRESULT)lstrlenW(wndPtr->text);
|
||||
WIN_ReleasePtr( wndPtr );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -18,21 +18,15 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "controls.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
static HBRUSH hbrushPattern;
|
||||
static HBITMAP hbitmapWallPaper;
|
||||
|
@ -119,7 +113,7 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
if (GetAncestor( hwnd, GA_PARENT )) return FALSE; /* refuse to create non-desktop window */
|
||||
|
||||
sprintfW( buffer, guid_formatW, guid->Data1, guid->Data2, guid->Data3,
|
||||
swprintf( buffer, ARRAY_SIZE(buffer), guid_formatW, guid->Data1, guid->Data2, guid->Data3,
|
||||
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
||||
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
|
||||
atom = GlobalAddAtomW( buffer );
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
@ -34,7 +31,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "controls.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
|
@ -167,7 +163,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
|||
else
|
||||
{
|
||||
info->className = p;
|
||||
p += strlenW( info->className ) + 1;
|
||||
p += lstrlenW( info->className ) + 1;
|
||||
}
|
||||
|
||||
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
|
||||
|
@ -178,7 +174,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
|||
else
|
||||
{
|
||||
info->windowName = p;
|
||||
p += strlenW( info->windowName ) + 1;
|
||||
p += lstrlenW( info->windowName ) + 1;
|
||||
}
|
||||
|
||||
TRACE(" %s %s %ld, %d, %d, %d, %d, %08x, %08x, %08x\n",
|
||||
|
@ -361,7 +357,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
|
|||
default:
|
||||
result->menuName = p;
|
||||
TRACE(" MENU %s\n", debugstr_w(result->menuName) );
|
||||
p += strlenW( result->menuName ) + 1;
|
||||
p += lstrlenW( result->menuName ) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -381,14 +377,14 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
|
|||
default:
|
||||
result->className = p;
|
||||
TRACE(" CLASS %s\n", debugstr_w( result->className ));
|
||||
p += strlenW( result->className ) + 1;
|
||||
p += lstrlenW( result->className ) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Get the window caption */
|
||||
|
||||
result->caption = p;
|
||||
p += strlenW( result->caption ) + 1;
|
||||
p += lstrlenW( result->caption ) + 1;
|
||||
TRACE(" CAPTION %s\n", debugstr_w( result->caption ) );
|
||||
|
||||
/* Get the font name */
|
||||
|
@ -423,7 +419,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
|
|||
result->italic = LOBYTE(GET_WORD(p)); p++;
|
||||
}
|
||||
result->faceName = p;
|
||||
p += strlenW( result->faceName ) + 1;
|
||||
p += lstrlenW( result->faceName ) + 1;
|
||||
|
||||
TRACE(" FONT %d, %s, %d, %s\n",
|
||||
result->pointSize, debugstr_w( result->faceName ),
|
||||
|
@ -972,12 +968,12 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM wParam )
|
|||
|
||||
do
|
||||
{
|
||||
p = strchrW( p + 2, '&' );
|
||||
p = wcschr( p + 2, '&' );
|
||||
}
|
||||
while (p != NULL && p[1] == '&');
|
||||
|
||||
/* and check if it's the one we're looking for */
|
||||
if (p != NULL && toupperW( p[1] ) == toupperW( wParam ) )
|
||||
if (p != NULL && towupper( p[1] ) == towupper( wParam ) )
|
||||
{
|
||||
if ((dlgCode & DLGC_STATIC) || (style & 0x0f) == BS_GROUPBOX )
|
||||
{
|
||||
|
@ -1220,7 +1216,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
|
|||
{
|
||||
INT length;
|
||||
SendMessageW (hwndNext, WM_GETTEXT, maxlen, (LPARAM) buffer);
|
||||
length = strlenW (buffer);
|
||||
length = lstrlenW (buffer);
|
||||
HeapFree (GetProcessHeap(), 0, buffer);
|
||||
SendMessageW (hwndNext, EM_SETSEL, 0, length);
|
||||
}
|
||||
|
@ -1783,17 +1779,17 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPWSTR str, INT len,
|
|||
}
|
||||
else
|
||||
{
|
||||
buffer[strlenW(buffer)-1] = '\\';
|
||||
buffer[lstrlenW(buffer)-1] = '\\';
|
||||
ptr = buffer + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Filenames without a dot extension must have one tacked at the end */
|
||||
if (strchrW(buffer, '.') == NULL)
|
||||
if (wcschr(buffer, '.') == NULL)
|
||||
{
|
||||
buffer[strlenW(buffer)+1] = '\0';
|
||||
buffer[strlenW(buffer)] = '.';
|
||||
buffer[lstrlenW(buffer)+1] = '\0';
|
||||
buffer[lstrlenW(buffer)] = '.';
|
||||
}
|
||||
ptr = buffer;
|
||||
}
|
||||
|
@ -1835,15 +1831,15 @@ static INT DIALOG_DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox,
|
|||
{
|
||||
WCHAR *p, *p2;
|
||||
|
||||
if (!strchrW(spec, '*') && !strchrW(spec, '?'))
|
||||
if (!wcschr(spec, '*') && !wcschr(spec, '?'))
|
||||
{
|
||||
SetLastError(ERROR_NO_WILDCARD_CHARACTERS);
|
||||
return FALSE;
|
||||
}
|
||||
p = spec;
|
||||
if ((p2 = strchrW( p, ':' ))) p = p2 + 1;
|
||||
if ((p2 = strrchrW( p, '\\' ))) p = p2;
|
||||
if ((p2 = strrchrW( p, '/' ))) p = p2;
|
||||
if ((p2 = wcschr( p, ':' ))) p = p2 + 1;
|
||||
if ((p2 = wcsrchr( p, '\\' ))) p = p2;
|
||||
if ((p2 = wcsrchr( p, '/' ))) p = p2;
|
||||
if (p != spec)
|
||||
{
|
||||
WCHAR sep = *p;
|
||||
|
|
|
@ -20,13 +20,15 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/gdi_driver.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "user_private.h"
|
||||
#include "controls.h"
|
||||
|
@ -68,13 +70,13 @@ static BOOL load_desktop_driver( HWND hwnd, HMODULE *module )
|
|||
|
||||
guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
|
||||
memcpy( key, key_pathW, sizeof(key_pathW) );
|
||||
if (!GlobalGetAtomNameW( guid_atom, key + strlenW(key), 40 )) return 0;
|
||||
strcatW( key, displayW );
|
||||
if (!GlobalGetAtomNameW( guid_atom, key + lstrlenW(key), 40 )) return 0;
|
||||
lstrcatW( key, displayW );
|
||||
if (RegOpenKeyW( HKEY_LOCAL_MACHINE, key, &hkey )) return 0;
|
||||
size = sizeof(path);
|
||||
if (!RegQueryValueExW( hkey, driverW, NULL, NULL, (BYTE *)path, &size ))
|
||||
{
|
||||
if ((ret = !strcmpW( path, nullW ))) *module = NULL;
|
||||
if ((ret = !wcscmp( path, nullW ))) *module = NULL;
|
||||
else ret = (*module = LoadLibraryW( path )) != NULL;
|
||||
if (!ret) ERR( "failed to load %s\n", debugstr_w(path) );
|
||||
TRACE( "%s %p\n", debugstr_w(path), *module );
|
||||
|
@ -231,7 +233,7 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
|||
rc = RegEnumKeyW(hKeyKeyboard, count, szKeyName, 9);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
layout = (HKL)(ULONG_PTR)strtoulW(szKeyName,NULL,16);
|
||||
layout = (HKL)(ULONG_PTR)wcstoul(szKeyName,NULL,16);
|
||||
if (baselayout != 0 && layout == (HKL)baselayout)
|
||||
baselayout = 0; /* found in the registry do not add again */
|
||||
if (size && layouts)
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -40,7 +38,6 @@
|
|||
#include "win.h"
|
||||
#include "imm.h"
|
||||
#include "usp10.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -171,7 +168,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap);
|
|||
*/
|
||||
static inline BOOL EDIT_EM_CanUndo(const EDITSTATE *es)
|
||||
{
|
||||
return (es->undo_insert_count || strlenW(es->undo_text));
|
||||
return (es->undo_insert_count || lstrlenW(es->undo_text));
|
||||
}
|
||||
|
||||
|
||||
|
@ -243,7 +240,7 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
|
|||
static inline UINT get_text_length(EDITSTATE *es)
|
||||
{
|
||||
if(es->text_length == (UINT)-1)
|
||||
es->text_length = strlenW(es->text);
|
||||
es->text_length = lstrlenW(es->text);
|
||||
return es->text_length;
|
||||
}
|
||||
|
||||
|
@ -576,7 +573,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
|
|||
/* Mark type of line termination */
|
||||
if (!(*cp)) {
|
||||
current_line->ending = END_0;
|
||||
current_line->net_length = strlenW(current_position);
|
||||
current_line->net_length = lstrlenW(current_position);
|
||||
} else if ((cp > current_position) && (*(cp - 1) == '\r')) {
|
||||
current_line->ending = END_SOFT;
|
||||
current_line->net_length = cp - current_position - 1;
|
||||
|
@ -2599,7 +2596,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
memcpy(buf, es->text + s, bufl * sizeof(WCHAR));
|
||||
buf[bufl] = 0; /* ensure 0 termination */
|
||||
/* now delete */
|
||||
strcpyW(es->text + s, es->text + e);
|
||||
lstrcpyW(es->text + s, es->text + e);
|
||||
text_buffer_changed(es);
|
||||
}
|
||||
if (strl) {
|
||||
|
@ -2627,7 +2624,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
/* if text is too long undo all changes */
|
||||
if (honor_limit && !(es->style & ES_AUTOVSCROLL) && (es->line_count > vlc)) {
|
||||
if (strl)
|
||||
strcpyW(es->text + e, es->text + e + strl);
|
||||
lstrcpyW(es->text + e, es->text + e + strl);
|
||||
if (e != s)
|
||||
for (i = 0 , p = es->text ; i < e - s ; i++)
|
||||
p[i + s] = buf[i];
|
||||
|
@ -2647,7 +2644,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
/* remove chars that don't fit */
|
||||
if (honor_limit && !(es->style & ES_AUTOHSCROLL) && (es->text_width > fw)) {
|
||||
while ((es->text_width > fw) && s + strl >= s) {
|
||||
strcpyW(es->text + s + strl - 1, es->text + s + strl);
|
||||
lstrcpyW(es->text + s + strl - 1, es->text + s + strl);
|
||||
strl--;
|
||||
es->text_length = -1;
|
||||
EDIT_InvalidateUniscribeData(es);
|
||||
|
@ -2660,7 +2657,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
|
||||
if (e != s) {
|
||||
if (can_undo) {
|
||||
utl = strlenW(es->undo_text);
|
||||
utl = lstrlenW(es->undo_text);
|
||||
if (!es->undo_insert_count && (*es->undo_text && (s == es->undo_position))) {
|
||||
/* undo-buffer is extended to the right */
|
||||
EDIT_MakeUndoFit(es, utl + e - s);
|
||||
|
@ -3041,11 +3038,11 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es)
|
|||
if( es->style & ES_READONLY )
|
||||
return !(es->style & ES_MULTILINE);
|
||||
|
||||
ulength = strlenW(es->undo_text);
|
||||
ulength = lstrlenW(es->undo_text);
|
||||
|
||||
utext = HeapAlloc(GetProcessHeap(), 0, (ulength + 1) * sizeof(WCHAR));
|
||||
|
||||
strcpyW(utext, es->undo_text);
|
||||
lstrcpyW(utext, es->undo_text);
|
||||
|
||||
TRACE("before UNDO:insertion length = %d, deletion buffer = %s\n",
|
||||
es->undo_insert_count, debugstr_w(utext));
|
||||
|
@ -3096,9 +3093,9 @@ static void EDIT_WM_Paste(EDITSTATE *es)
|
|||
OpenClipboard(es->hwndSelf);
|
||||
if ((hsrc = GetClipboardData(CF_UNICODETEXT))) {
|
||||
src = GlobalLock(hsrc);
|
||||
len = strlenW(src);
|
||||
len = lstrlenW(src);
|
||||
/* Protect single-line edit against pasting new line character */
|
||||
if (!(es->style & ES_MULTILINE) && ((ptr = strchrW(src, '\n')))) {
|
||||
if (!(es->style & ES_MULTILINE) && ((ptr = wcschr(src, '\n')))) {
|
||||
len = ptr - src;
|
||||
if (len && src[len - 1] == '\r')
|
||||
--len;
|
||||
|
@ -3358,7 +3355,7 @@ static INT EDIT_WM_GetText(const EDITSTATE *es, INT count, LPWSTR dst, BOOL unic
|
|||
if(unicode)
|
||||
{
|
||||
lstrcpynW(dst, es->text, count);
|
||||
return strlenW(dst);
|
||||
return lstrlenW(dst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3930,7 +3927,7 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode)
|
|||
if (text)
|
||||
{
|
||||
TRACE("%s\n", debugstr_w(text));
|
||||
EDIT_EM_ReplaceSel(es, FALSE, text, strlenW(text), FALSE, FALSE);
|
||||
EDIT_EM_ReplaceSel(es, FALSE, text, lstrlenW(text), FALSE, FALSE);
|
||||
if(!unicode)
|
||||
HeapFree(GetProcessHeap(), 0, textW);
|
||||
}
|
||||
|
@ -4611,7 +4608,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name)
|
|||
EDIT_SetRectNP(es, &clientRect);
|
||||
|
||||
if (name && *name) {
|
||||
EDIT_EM_ReplaceSel(es, FALSE, name, strlenW(name), FALSE, FALSE);
|
||||
EDIT_EM_ReplaceSel(es, FALSE, name, lstrlenW(name), FALSE, FALSE);
|
||||
/* if we insert text to the editline, the text scrolls out
|
||||
* of the window, as the caret is placed after the insert
|
||||
* pos normally; thus we reset es->selection... to 0 and
|
||||
|
@ -4795,7 +4792,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
|
|||
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
|
||||
}
|
||||
|
||||
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, strlenW(textW), TRUE, TRUE);
|
||||
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, lstrlenW(textW), TRUE, TRUE);
|
||||
result = 1;
|
||||
|
||||
if(!unicode)
|
||||
|
|
|
@ -22,15 +22,10 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h> /* abs() */
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
|
|
@ -62,21 +62,18 @@
|
|||
* WH_MOUSE_LL Implemented but should use SendMessage instead
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winerror.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/asm.h"
|
||||
#include "wine/debug.h"
|
||||
#include "winternl.h"
|
||||
|
@ -187,7 +184,7 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
|
|||
if (inst) /* make proc relative to the module base */
|
||||
{
|
||||
req->proc = wine_server_client_ptr( (void *)((char *)proc - (char *)inst) );
|
||||
wine_server_add_data( req, module, strlenW(module) * sizeof(WCHAR) );
|
||||
wine_server_add_data( req, module, lstrlenW(module) * sizeof(WCHAR) );
|
||||
}
|
||||
else req->proc = wine_server_client_ptr( proc );
|
||||
|
||||
|
@ -744,7 +741,7 @@ HWINEVENTHOOK WINAPI SetWinEventHook(DWORD event_min, DWORD event_max,
|
|||
if (inst) /* make proc relative to the module base */
|
||||
{
|
||||
req->proc = wine_server_client_ptr( (void *)((char *)proc - (char *)inst) );
|
||||
wine_server_add_data( req, module, strlenW(module) * sizeof(WCHAR) );
|
||||
wine_server_add_data( req, module, lstrlenW(module) * sizeof(WCHAR) );
|
||||
}
|
||||
else req->proc = wine_server_client_ptr( proc );
|
||||
|
||||
|
|
|
@ -18,20 +18,14 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "controls.h"
|
||||
#include "win.h"
|
||||
|
||||
|
@ -71,8 +65,8 @@ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
|
|||
|
||||
if( !length )
|
||||
{
|
||||
strcpyW( str, emptyTitleText );
|
||||
length = strlenW( str );
|
||||
lstrcpyW( str, emptyTitleText );
|
||||
length = lstrlenW( str );
|
||||
}
|
||||
|
||||
if (!(hDC = GetDC( hwnd ))) return FALSE;
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -48,7 +45,6 @@
|
|||
#include "dbt.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(win);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(keyboard);
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include <stdio.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "user_private.h"
|
||||
#include "controls.h"
|
||||
#include "wine/exception.h"
|
||||
|
@ -709,14 +709,14 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
|
|||
else if (!(descr->style & LBS_USETABSTOPS))
|
||||
ExtTextOutW( hdc, rect->left + 1, rect->top,
|
||||
ETO_OPAQUE | ETO_CLIPPED, rect, item_str,
|
||||
strlenW(item_str), NULL );
|
||||
lstrlenW(item_str), NULL );
|
||||
else
|
||||
{
|
||||
/* Output empty string to paint background in the full width. */
|
||||
ExtTextOutW( hdc, rect->left + 1, rect->top,
|
||||
ETO_OPAQUE | ETO_CLIPPED, rect, NULL, 0, NULL );
|
||||
TabbedTextOutW( hdc, rect->left + 1 , rect->top,
|
||||
item_str, strlenW(item_str),
|
||||
item_str, lstrlenW(item_str),
|
||||
descr->nb_tabs, descr->tabs, 0);
|
||||
}
|
||||
if (selected)
|
||||
|
@ -883,7 +883,7 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL
|
|||
|
||||
if (!buffer)
|
||||
{
|
||||
len = strlenW(str);
|
||||
len = lstrlenW(str);
|
||||
if( unicode )
|
||||
return len;
|
||||
return WideCharToMultiByte( CP_ACP, 0, str, len, NULL, 0, NULL, NULL );
|
||||
|
@ -895,8 +895,8 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL
|
|||
{
|
||||
if(unicode)
|
||||
{
|
||||
strcpyW(buffer, str);
|
||||
len = strlenW(buffer);
|
||||
lstrcpyW(buffer, str);
|
||||
len = lstrlenW(buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1053,7 +1053,7 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
|
|||
else
|
||||
{
|
||||
/* Special case for drives and directories: ignore prefix */
|
||||
INT len = strlenW(str);
|
||||
INT len = lstrlenW(str);
|
||||
WCHAR *item_str;
|
||||
|
||||
for (i = 0, index = start; i < descr->nb_items; i++, index++)
|
||||
|
@ -1061,11 +1061,11 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
|
|||
if (index == descr->nb_items) index = 0;
|
||||
item_str = get_item_string(descr, index);
|
||||
|
||||
if (!strncmpiW(str, item_str, len)) return index;
|
||||
if (!wcsnicmp(str, item_str, len)) return index;
|
||||
if (item_str[0] == '[')
|
||||
{
|
||||
if (!strncmpiW(str, item_str + 1, len)) return index;
|
||||
if (item_str[1] == '-' && !strncmpiW(str, item_str + 2, len)) return index;
|
||||
if (!wcsnicmp(str, item_str + 1, len)) return index;
|
||||
if (item_str[1] == '-' && !wcsnicmp(str, item_str + 2, len)) return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1703,12 +1703,12 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str )
|
|||
{
|
||||
static const WCHAR empty_stringW[] = { 0 };
|
||||
if (!str) str = empty_stringW;
|
||||
if (!(new_str = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1) * sizeof(WCHAR) )))
|
||||
if (!(new_str = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(str) + 1) * sizeof(WCHAR) )))
|
||||
{
|
||||
SEND_NOTIFICATION( descr, LBN_ERRSPACE );
|
||||
return LB_ERRSPACE;
|
||||
}
|
||||
strcpyW(new_str, str);
|
||||
lstrcpyW(new_str, str);
|
||||
}
|
||||
|
||||
if (index == -1) index = descr->nb_items;
|
||||
|
@ -1899,13 +1899,13 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
|
|||
static const WCHAR bracketW[] = { ']',0 };
|
||||
static const WCHAR dotW[] = { '.',0 };
|
||||
if (!(attrib & DDL_DIRECTORY) ||
|
||||
!strcmpW( entry.cFileName, dotW )) continue;
|
||||
!wcscmp( entry.cFileName, dotW )) continue;
|
||||
buffer[0] = '[';
|
||||
if (!long_names && entry.cAlternateFileName[0])
|
||||
strcpyW( buffer + 1, entry.cAlternateFileName );
|
||||
lstrcpyW( buffer + 1, entry.cAlternateFileName );
|
||||
else
|
||||
strcpyW( buffer + 1, entry.cFileName );
|
||||
strcatW(buffer, bracketW);
|
||||
lstrcpyW( buffer + 1, entry.cFileName );
|
||||
lstrcatW(buffer, bracketW);
|
||||
}
|
||||
else /* not a directory */
|
||||
{
|
||||
|
@ -1917,9 +1917,9 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
|
|||
continue;
|
||||
#undef ATTRIBS
|
||||
if (!long_names && entry.cAlternateFileName[0])
|
||||
strcpyW( buffer, entry.cAlternateFileName );
|
||||
lstrcpyW( buffer, entry.cAlternateFileName );
|
||||
else
|
||||
strcpyW( buffer, entry.cFileName );
|
||||
lstrcpyW( buffer, entry.cFileName );
|
||||
}
|
||||
if (!long_names) CharLowerW( buffer );
|
||||
pos = LISTBOX_FindFileStrPos( descr, buffer );
|
||||
|
@ -2807,9 +2807,9 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
return LB_ERR;
|
||||
}
|
||||
if (!HAS_STRINGS(descr)) return sizeof(ULONG_PTR);
|
||||
if (unicode) return strlenW(get_item_string(descr, wParam));
|
||||
if (unicode) return lstrlenW(get_item_string(descr, wParam));
|
||||
return WideCharToMultiByte( CP_ACP, 0, get_item_string(descr, wParam),
|
||||
strlenW(get_item_string(descr, wParam)), NULL, 0, NULL, NULL );
|
||||
lstrlenW(get_item_string(descr, wParam)), NULL, 0, NULL, NULL );
|
||||
|
||||
case LB_GETCURSEL:
|
||||
if (descr->nb_items == 0)
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -90,10 +90,10 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
|
@ -984,8 +984,8 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient, BOOL repaint, LPCWSTR
|
|||
if (lpTitle)
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, ci->frameTitle );
|
||||
if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))))
|
||||
strcpyW( ci->frameTitle, lpTitle );
|
||||
if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(lpTitle)+1)*sizeof(WCHAR))))
|
||||
lstrcpyW( ci->frameTitle, lpTitle );
|
||||
}
|
||||
|
||||
if (ci->frameTitle)
|
||||
|
@ -996,16 +996,16 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient, BOOL repaint, LPCWSTR
|
|||
|
||||
static const WCHAR lpBracket[] = {' ','-',' ','[',0};
|
||||
static const WCHAR lpBracket2[] = {']',0};
|
||||
int i_frame_text_length = strlenW(ci->frameTitle);
|
||||
int i_frame_text_length = lstrlenW(ci->frameTitle);
|
||||
|
||||
lstrcpynW( lpBuffer, ci->frameTitle, MDI_MAXTITLELENGTH);
|
||||
|
||||
if( i_frame_text_length + 6 < MDI_MAXTITLELENGTH )
|
||||
{
|
||||
strcatW( lpBuffer, lpBracket );
|
||||
lstrcatW( lpBuffer, lpBracket );
|
||||
if (GetWindowTextW( ci->hwndActiveChild, lpBuffer + i_frame_text_length + 4,
|
||||
MDI_MAXTITLELENGTH - i_frame_text_length - 5 ))
|
||||
strcatW( lpBuffer, lpBracket2 );
|
||||
lstrcatW( lpBuffer, lpBracket2 );
|
||||
else
|
||||
lpBuffer[i_frame_text_length] = 0; /* remove bracket */
|
||||
}
|
||||
|
@ -1919,7 +1919,7 @@ static INT_PTR WINAPI MDI_MoreWindowsDlgProc (HWND hDlg, UINT iMsg, WPARAM wPara
|
|||
continue;
|
||||
SendMessageW(hListBox, LB_ADDSTRING, 0, (LPARAM)buffer );
|
||||
SendMessageW(hListBox, LB_SETITEMDATA, i, (LPARAM)ci->child[i] );
|
||||
length = strlenW(buffer); /* FIXME: should use GetTextExtentPoint */
|
||||
length = lstrlenW(buffer); /* FIXME: should use GetTextExtentPoint */
|
||||
if (length > widest)
|
||||
widest = length;
|
||||
}
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
* - MNS_MODELESS
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -52,7 +49,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/exception.h"
|
||||
#include "win.h"
|
||||
#include "controls.h"
|
||||
|
@ -803,11 +799,11 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu,
|
|||
do
|
||||
{
|
||||
const WCHAR *q = p + 2;
|
||||
p = strchrW (q, '&');
|
||||
if (!p && cjk) p = strchrW (q, '\036'); /* Japanese Win16 */
|
||||
p = wcschr (q, '&');
|
||||
if (!p && cjk) p = wcschr (q, '\036'); /* Japanese Win16 */
|
||||
}
|
||||
while (p != NULL && p [1] == '&');
|
||||
if (p && (toupperW(p[1]) == toupperW(key))) return i;
|
||||
if (p && (towupper(p[1]) == towupper(key))) return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1134,7 +1130,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
|
|||
GetSystemMetrics( SM_CYMENU) - 1);
|
||||
lpitem->rect.right += 2 * menucharsize.cx;
|
||||
} else {
|
||||
if ((p = strchrW( lpitem->text, '\t' )) != NULL) {
|
||||
if ((p = wcschr( lpitem->text, '\t' )) != NULL) {
|
||||
RECT tmprc = rc;
|
||||
LONG tmpheight;
|
||||
int n = (int)( p - lpitem->text);
|
||||
|
@ -2216,7 +2212,7 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu )
|
|||
res += sizeof(WORD);
|
||||
}
|
||||
str = (LPCWSTR)res;
|
||||
res += (strlenW(str) + 1) * sizeof(WCHAR);
|
||||
res += (lstrlenW(str) + 1) * sizeof(WCHAR);
|
||||
if (flags & MF_POPUP)
|
||||
{
|
||||
HMENU hSubMenu = CreatePopupMenu();
|
||||
|
@ -2258,7 +2254,7 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
|
|||
/* Align the text on a word boundary. */
|
||||
res += (~((UINT_PTR)res - 1)) & 1;
|
||||
mii.dwTypeData = (LPWSTR) res;
|
||||
res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR);
|
||||
res += (1 + lstrlenW(mii.dwTypeData)) * sizeof(WCHAR);
|
||||
/* Align the following fields on a dword boundary. */
|
||||
res += (~((UINT_PTR)res - 1)) & 3;
|
||||
|
||||
|
@ -3833,7 +3829,7 @@ INT WINAPI GetMenuStringW( HMENU hMenu, UINT wItemID,
|
|||
item = &menu->items[pos];
|
||||
|
||||
if (!str || !nMaxSiz)
|
||||
ret = item->text ? strlenW(item->text) : 0;
|
||||
ret = item->text ? lstrlenW(item->text) : 0;
|
||||
else if (!item->text)
|
||||
{
|
||||
str[0] = 0;
|
||||
|
@ -3842,7 +3838,7 @@ INT WINAPI GetMenuStringW( HMENU hMenu, UINT wItemID,
|
|||
else
|
||||
{
|
||||
lstrcpynW( str, item->text, nMaxSiz );
|
||||
ret = strlenW(str);
|
||||
ret = lstrlenW(str);
|
||||
}
|
||||
release_menu_ptr(menu);
|
||||
|
||||
|
@ -4785,7 +4781,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT id, BOOL bypos,
|
|||
int len;
|
||||
if (unicode)
|
||||
{
|
||||
len = strlenW(item->text);
|
||||
len = lstrlenW(item->text);
|
||||
if(lpmii->dwTypeData && lpmii->cch)
|
||||
lstrcpynW(lpmii->dwTypeData, item->text, lpmii->cch);
|
||||
}
|
||||
|
@ -4894,8 +4890,8 @@ static inline void set_menu_item_text( MENUITEM *menu, LPCWSTR text, BOOL unicod
|
|||
menu->text = NULL;
|
||||
else if (unicode)
|
||||
{
|
||||
if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (strlenW(text)+1) * sizeof(WCHAR) )))
|
||||
strcpyW( menu->text, text );
|
||||
if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(text)+1) * sizeof(WCHAR) )))
|
||||
lstrcpyW( menu->text, text );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -39,7 +36,6 @@
|
|||
#include "dde.h"
|
||||
#include "imm.h"
|
||||
#include "ddk/imm.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/server.h"
|
||||
#include "user_private.h"
|
||||
#include "win.h"
|
||||
|
@ -450,7 +446,7 @@ static inline void push_data( struct packed_message *data, const void *ptr, size
|
|||
/* add a string to a packed message */
|
||||
static inline void push_string( struct packed_message *data, LPCWSTR str )
|
||||
{
|
||||
push_data( data, str, (strlenW(str) + 1) * sizeof(WCHAR) );
|
||||
push_data( data, str, (lstrlenW(str) + 1) * sizeof(WCHAR) );
|
||||
}
|
||||
|
||||
/* make sure that the buffer contains a valid null-terminated Unicode string */
|
||||
|
@ -1129,8 +1125,8 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
|||
{
|
||||
if (!check_string( str, size )) return FALSE;
|
||||
cs.lpszName = str;
|
||||
size -= (strlenW(str) + 1) * sizeof(WCHAR);
|
||||
str += strlenW(str) + 1;
|
||||
size -= (lstrlenW(str) + 1) * sizeof(WCHAR);
|
||||
str += lstrlenW(str) + 1;
|
||||
}
|
||||
if (ps->cs.lpszClass >> 16)
|
||||
{
|
||||
|
@ -1415,8 +1411,8 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
|||
{
|
||||
if (!check_string( str, size )) return FALSE;
|
||||
mcs.szClass = str;
|
||||
size -= (strlenW(str) + 1) * sizeof(WCHAR);
|
||||
str += strlenW(str) + 1;
|
||||
size -= (lstrlenW(str) + 1) * sizeof(WCHAR);
|
||||
str += lstrlenW(str) + 1;
|
||||
}
|
||||
if (ps->mcs.szTitle >> 16)
|
||||
{
|
||||
|
@ -1646,7 +1642,7 @@ static void pack_reply( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam,
|
|||
break;
|
||||
}
|
||||
case WM_ASKCBFORMATNAME:
|
||||
push_data( data, (WCHAR *)lparam, (strlenW((WCHAR *)lparam) + 1) * sizeof(WCHAR) );
|
||||
push_data( data, (WCHAR *)lparam, (lstrlenW((WCHAR *)lparam) + 1) * sizeof(WCHAR) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
@ -32,7 +30,6 @@
|
|||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(win);
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
@ -1583,9 +1581,12 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
|||
if (hmodule)
|
||||
{
|
||||
BOOL (WINAPI *aboutproc)(HWND, LPCSTR, LPCSTR, HICON);
|
||||
extern const char * CDECL wine_get_version(void);
|
||||
char app[256];
|
||||
|
||||
sprintf( app, "Wine %s", wine_get_version() );
|
||||
aboutproc = (void *)GetProcAddress( hmodule, "ShellAboutA" );
|
||||
if (aboutproc) aboutproc( hwnd, PACKAGE_STRING, NULL, 0 );
|
||||
if (aboutproc) aboutproc( hwnd, app, NULL, 0 );
|
||||
FreeLibrary( hmodule );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -18,16 +18,13 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/server.h"
|
||||
|
||||
/* size of buffer needed to store an atom string */
|
||||
|
@ -135,7 +132,7 @@ HANDLE WINAPI GetPropW( HWND hwnd, LPCWSTR str )
|
|||
{
|
||||
req->window = wine_server_user_handle( hwnd );
|
||||
if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
|
||||
else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
|
||||
else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req )) ret = reply->data;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -168,7 +165,7 @@ BOOL WINAPI SetPropW( HWND hwnd, LPCWSTR str, HANDLE handle )
|
|||
req->window = wine_server_user_handle( hwnd );
|
||||
req->data = (ULONG_PTR)handle;
|
||||
if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
|
||||
else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
|
||||
else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) );
|
||||
ret = !wine_server_call_err( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -200,7 +197,7 @@ HANDLE WINAPI RemovePropW( HWND hwnd, LPCWSTR str )
|
|||
{
|
||||
req->window = wine_server_user_handle( hwnd );
|
||||
if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
|
||||
else wine_server_add_data( req, str, strlenW(str) * sizeof(WCHAR) );
|
||||
else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req )) ret = reply->data;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
@ -684,7 +683,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
|
|||
}
|
||||
else
|
||||
{
|
||||
*data_size = strlenW(device->path) + 1;
|
||||
*data_size = lstrlenW(device->path) + 1;
|
||||
to_copy = device->path;
|
||||
}
|
||||
to_copy_bytes = *data_size * sizeof(WCHAR);
|
||||
|
@ -745,7 +744,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
|
|||
return *data_size;
|
||||
}
|
||||
|
||||
static int compare_raw_input_devices(const void *ap, const void *bp)
|
||||
static int __cdecl compare_raw_input_devices(const void *ap, const void *bp)
|
||||
{
|
||||
const RAWINPUTDEVICE a = *(const RAWINPUTDEVICE *)ap;
|
||||
const RAWINPUTDEVICE b = *(const RAWINPUTDEVICE *)bp;
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winreg.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -2147,7 +2146,7 @@ static void SPY_GetClassName( SPY_INSTANCE *sp_e )
|
|||
/* special code to detect a property sheet dialog */
|
||||
if ((GetClassLongW(sp_e->msg_hwnd, GCW_ATOM) == WC_DIALOG) &&
|
||||
(GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) {
|
||||
strcpyW(sp_e->wnd_class, WC_PROPSHEETW);
|
||||
lstrcpyW(sp_e->wnd_class, WC_PROPSHEETW);
|
||||
}
|
||||
else {
|
||||
GetClassNameW(sp_e->msg_hwnd, sp_e->wnd_class, ARRAY_SIZE(sp_e->wnd_class));
|
||||
|
@ -2185,7 +2184,7 @@ static void SPY_GetMsgStuff( SPY_INSTANCE *sp_e )
|
|||
#endif
|
||||
|
||||
while (cc_array[i].classname &&
|
||||
strcmpiW(cc_array[i].classname, sp_e->wnd_class) != 0) i++;
|
||||
wcsicmp(cc_array[i].classname, sp_e->wnd_class) != 0) i++;
|
||||
|
||||
if (cc_array[i].classname)
|
||||
{
|
||||
|
@ -2541,7 +2540,7 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
|
|||
save_error = GetLastError();
|
||||
GetClassNameW(pnmh->hwndFrom, from_class, ARRAY_SIZE(from_class));
|
||||
SetLastError(save_error);
|
||||
if (strcmpW(TOOLBARCLASSNAMEW, from_class) == 0)
|
||||
if (wcscmp(TOOLBARCLASSNAMEW, from_class) == 0)
|
||||
dumplen = sizeof(NMTBCUSTOMDRAW)-sizeof(NMHDR);
|
||||
} else if ( pnmh->code >= HDN_ENDDRAG
|
||||
&& pnmh->code <= HDN_ITEMCHANGINGA ) {
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
@ -47,7 +46,6 @@
|
|||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/gdi_driver.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/asm.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -595,10 +593,10 @@ static BOOL is_valid_adapter_name(const WCHAR *name)
|
|||
long int adapter_idx;
|
||||
WCHAR *end;
|
||||
|
||||
if (strncmpiW(name, ADAPTER_PREFIX, ARRAY_SIZE(ADAPTER_PREFIX)))
|
||||
if (wcsnicmp(name, ADAPTER_PREFIX, ARRAY_SIZE(ADAPTER_PREFIX)))
|
||||
return FALSE;
|
||||
|
||||
adapter_idx = strtolW(name + ARRAY_SIZE(ADAPTER_PREFIX), &end, 10);
|
||||
adapter_idx = wcstol(name + ARRAY_SIZE(ADAPTER_PREFIX), &end, 10);
|
||||
if (*end || adapter_idx < 1)
|
||||
return FALSE;
|
||||
|
||||
|
@ -723,7 +721,7 @@ static BOOL save_entry( const struct sysparam_entry *entry, const void *data, DW
|
|||
/* save a string value to a registry entry */
|
||||
static BOOL save_entry_string( const struct sysparam_entry *entry, const WCHAR *str, UINT flags )
|
||||
{
|
||||
return save_entry( entry, str, (strlenW(str) + 1) * sizeof(WCHAR), REG_SZ, flags );
|
||||
return save_entry( entry, str, (lstrlenW(str) + 1) * sizeof(WCHAR), REG_SZ, flags );
|
||||
}
|
||||
|
||||
/* initialize an entry in the registry if missing */
|
||||
|
@ -743,7 +741,7 @@ static BOOL init_entry( struct sysparam_entry *entry, const void *data, DWORD si
|
|||
/* initialize a string value in the registry if missing */
|
||||
static BOOL init_entry_string( struct sysparam_entry *entry, const WCHAR *str )
|
||||
{
|
||||
return init_entry( entry, str, (strlenW(str) + 1) * sizeof(WCHAR), REG_SZ );
|
||||
return init_entry( entry, str, (lstrlenW(str) + 1) * sizeof(WCHAR), REG_SZ );
|
||||
}
|
||||
|
||||
HDC get_display_dc(void)
|
||||
|
@ -811,7 +809,7 @@ static INT CALLBACK real_fontname_proc(const LOGFONTW *lf, const TEXTMETRICW *nt
|
|||
static void get_real_fontname( LOGFONTW *lf, WCHAR fullname[LF_FACESIZE] )
|
||||
{
|
||||
HDC hdc = get_display_dc();
|
||||
strcpyW( fullname, lf->lfFaceName );
|
||||
lstrcpyW( fullname, lf->lfFaceName );
|
||||
EnumFontFamiliesExW( hdc, lf, real_fontname_proc, (LPARAM)fullname, 0 );
|
||||
release_display_dc( hdc );
|
||||
}
|
||||
|
@ -860,7 +858,7 @@ static BOOL get_uint_entry( union sysparam_all_entry *entry, UINT int_param, voi
|
|||
{
|
||||
WCHAR buf[32];
|
||||
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->uint.val = atoiW( buf );
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->uint.val = wcstol( buf, NULL, 10 );
|
||||
}
|
||||
*(UINT *)ptr_param = entry->uint.val;
|
||||
return TRUE;
|
||||
|
@ -919,7 +917,7 @@ static BOOL get_twips_entry( union sysparam_all_entry *entry, UINT int_param, vo
|
|||
{
|
||||
WCHAR buf[32];
|
||||
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->uint.val = atoiW( buf );
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->uint.val = wcstol( buf, NULL, 10 );
|
||||
}
|
||||
|
||||
/* Dimensions are quoted as being "twips" values if negative and pixels if positive.
|
||||
|
@ -955,7 +953,7 @@ static BOOL get_bool_entry( union sysparam_all_entry *entry, UINT int_param, voi
|
|||
{
|
||||
WCHAR buf[32];
|
||||
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->bool.val = atoiW( buf ) != 0;
|
||||
if (load_entry( &entry->hdr, buf, sizeof(buf) )) entry->bool.val = wcstol( buf, NULL, 10 ) != 0;
|
||||
}
|
||||
*(UINT *)ptr_param = entry->bool.val;
|
||||
return TRUE;
|
||||
|
@ -1059,13 +1057,13 @@ static BOOL get_rgb_entry( union sysparam_all_entry *entry, UINT int_param, void
|
|||
DWORD r, g, b;
|
||||
WCHAR *end, *str = buf;
|
||||
|
||||
r = strtoulW( str, &end, 10 );
|
||||
r = wcstoul( str, &end, 10 );
|
||||
if (end == str || !*end) goto done;
|
||||
str = end + 1;
|
||||
g = strtoulW( str, &end, 10 );
|
||||
g = wcstoul( str, &end, 10 );
|
||||
if (end == str || !*end) goto done;
|
||||
str = end + 1;
|
||||
b = strtoulW( str, &end, 10 );
|
||||
b = wcstoul( str, &end, 10 );
|
||||
if (end == str) goto done;
|
||||
if (r > 255 || g > 255 || b > 255) goto done;
|
||||
entry->rgb.val = RGB( r, g, b );
|
||||
|
@ -1147,7 +1145,7 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
|
|||
}
|
||||
font = entry->font.val;
|
||||
font.lfHeight = map_to_dpi( font.lfHeight, dpi );
|
||||
strcpyW( font.lfFaceName, entry->font.fullname );
|
||||
lstrcpyW( font.lfFaceName, entry->font.fullname );
|
||||
*(LOGFONTW *)ptr_param = font;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1160,7 +1158,7 @@ static BOOL set_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
|
|||
|
||||
memcpy( &font, ptr_param, sizeof(font) );
|
||||
/* zero pad the end of lfFaceName so we don't save uninitialised data */
|
||||
ptr = memchrW( font.lfFaceName, 0, LF_FACESIZE );
|
||||
ptr = wmemchr( font.lfFaceName, 0, LF_FACESIZE );
|
||||
if (ptr) memset( ptr, 0, (font.lfFaceName + LF_FACESIZE - ptr) * sizeof(WCHAR) );
|
||||
if (font.lfHeight < 0) font.lfHeight = map_from_system_dpi( font.lfHeight );
|
||||
|
||||
|
@ -1207,7 +1205,7 @@ static BOOL set_path_entry( union sysparam_all_entry *entry, UINT int_param, voi
|
|||
ret = save_entry_string( &entry->hdr, buffer, flags );
|
||||
if (ret)
|
||||
{
|
||||
strcpyW( entry->path.path, buffer );
|
||||
lstrcpyW( entry->path.path, buffer );
|
||||
entry->hdr.loaded = TRUE;
|
||||
}
|
||||
return ret;
|
||||
|
@ -4030,7 +4028,7 @@ static BOOL update_monitor_cache(void)
|
|||
(BYTE *)monitors[monitor_count].szDevice, CCHDEVICENAME * sizeof(WCHAR), NULL, 0))
|
||||
goto fail;
|
||||
monitors[monitor_count].dwFlags =
|
||||
!lstrcmpW( DEFAULT_ADAPTER_NAME, monitors[monitor_count].szDevice ) ? MONITORINFOF_PRIMARY : 0;
|
||||
!wcscmp( DEFAULT_ADAPTER_NAME, monitors[monitor_count].szDevice ) ? MONITORINFOF_PRIMARY : 0;
|
||||
|
||||
monitor_count++;
|
||||
}
|
||||
|
@ -4301,7 +4299,7 @@ BOOL WINAPI EnumDisplayDevicesW( LPCWSTR device, DWORD index, DISPLAY_DEVICEW *i
|
|||
/* Find adapter */
|
||||
if (!device)
|
||||
{
|
||||
sprintfW( key_nameW, VIDEO_VALUE_FMT, index );
|
||||
swprintf( key_nameW, ARRAY_SIZE(key_nameW), VIDEO_VALUE_FMT, index );
|
||||
size = sizeof(bufferW);
|
||||
if (RegGetValueW( HKEY_LOCAL_MACHINE, VIDEO_KEY, key_nameW, RRF_RT_REG_SZ, NULL, bufferW, &size ))
|
||||
goto done;
|
||||
|
@ -4311,7 +4309,7 @@ BOOL WINAPI EnumDisplayDevicesW( LPCWSTR device, DWORD index, DISPLAY_DEVICEW *i
|
|||
lstrcpyW( info->DeviceKey, bufferW );
|
||||
|
||||
/* DeviceName */
|
||||
sprintfW( info->DeviceName, ADAPTER_FMT, index + 1 );
|
||||
swprintf( info->DeviceName, ARRAY_SIZE(info->DeviceName), ADAPTER_FMT, index + 1 );
|
||||
|
||||
/* Strip \Registry\Machine\ */
|
||||
lstrcpyW( key_nameW, bufferW + 18 );
|
||||
|
@ -4352,23 +4350,23 @@ BOOL WINAPI EnumDisplayDevicesW( LPCWSTR device, DWORD index, DISPLAY_DEVICEW *i
|
|||
else
|
||||
{
|
||||
/* Check adapter name */
|
||||
if (strncmpiW( device, ADAPTER_PREFIX, ARRAY_SIZE(ADAPTER_PREFIX) ))
|
||||
if (wcsnicmp( device, ADAPTER_PREFIX, ARRAY_SIZE(ADAPTER_PREFIX) ))
|
||||
goto done;
|
||||
|
||||
adapter_index = strtolW( device + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10 );
|
||||
sprintfW( key_nameW, VIDEO_VALUE_FMT, adapter_index - 1 );
|
||||
adapter_index = wcstol( device + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10 );
|
||||
swprintf( key_nameW, ARRAY_SIZE(key_nameW), VIDEO_VALUE_FMT, adapter_index - 1 );
|
||||
|
||||
size = sizeof(bufferW);
|
||||
if (RegGetValueW( HKEY_LOCAL_MACHINE, VIDEO_KEY, key_nameW, RRF_RT_REG_SZ, NULL, bufferW, &size ))
|
||||
goto done;
|
||||
|
||||
/* DeviceName */
|
||||
sprintfW( info->DeviceName, MONITOR_FMT, adapter_index, index );
|
||||
swprintf( info->DeviceName, ARRAY_SIZE(info->DeviceName), MONITOR_FMT, adapter_index, index );
|
||||
|
||||
/* Get monitor instance */
|
||||
/* Strip \Registry\Machine\ first */
|
||||
lstrcpyW( key_nameW, bufferW + 18 );
|
||||
sprintfW( bufferW, MONITOR_ID_VALUE_FMT, index );
|
||||
swprintf( bufferW, ARRAY_SIZE(bufferW), MONITOR_ID_VALUE_FMT, index );
|
||||
|
||||
size = sizeof(instanceW);
|
||||
if (RegGetValueW( HKEY_CURRENT_CONFIG, key_nameW, bufferW, RRF_RT_REG_SZ, NULL, instanceW, &size ))
|
||||
|
@ -4409,7 +4407,7 @@ BOOL WINAPI EnumDisplayDevicesW( LPCWSTR device, DWORD index, DISPLAY_DEVICEW *i
|
|||
lstrcatW( info->DeviceID, instanceW );
|
||||
lstrcatW( info->DeviceID, GUID_DEVINTERFACE_MONITOR );
|
||||
/* Replace '\\' with '#' after prefix */
|
||||
for (next_charW = info->DeviceID + strlenW( MONITOR_INTERFACE_PREFIX ); *next_charW;
|
||||
for (next_charW = info->DeviceID + lstrlenW( MONITOR_INTERFACE_PREFIX ); *next_charW;
|
||||
next_charW++)
|
||||
{
|
||||
if (*next_charW == '\\')
|
||||
|
@ -4817,7 +4815,7 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
|
|||
goto done;
|
||||
|
||||
/* Extract the adapter index from device_name to use as the source ID */
|
||||
adapter_index = strtolW(device_name + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10);
|
||||
adapter_index = wcstol(device_name + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10);
|
||||
adapter_index--;
|
||||
|
||||
if (path_index == *numpathelements || mode_index == *numinfoelements)
|
||||
|
@ -4914,7 +4912,7 @@ LONG WINAPI DisplayConfigGetDeviceInfo(DISPLAYCONFIG_DEVICE_INFO_HEADER *packet)
|
|||
&type, (BYTE *)device_name, sizeof(device_name), NULL, 0))
|
||||
continue;
|
||||
|
||||
source_id = strtolW(device_name + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10);
|
||||
source_id = wcstol(device_name + ARRAY_SIZE(ADAPTER_PREFIX), NULL, 10);
|
||||
source_id--;
|
||||
if (source_name->header.id != source_id)
|
||||
continue;
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -35,7 +32,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winnls.h"
|
||||
#include "controls.h"
|
||||
#include "usp10.h"
|
||||
|
@ -142,7 +138,7 @@ static void TEXT_Ellipsify (HDC hdc, WCHAR *str, unsigned int max_len,
|
|||
unsigned int len_ellipsis;
|
||||
unsigned int lo, mid, hi;
|
||||
|
||||
len_ellipsis = strlenW (ELLIPSISW);
|
||||
len_ellipsis = lstrlenW (ELLIPSISW);
|
||||
if (len_ellipsis > max_len) len_ellipsis = max_len;
|
||||
if (*len_str > max_len - len_ellipsis)
|
||||
*len_str = max_len - len_ellipsis;
|
||||
|
@ -239,7 +235,7 @@ static void TEXT_PathEllipsify (HDC hdc, WCHAR *str, unsigned int max_len,
|
|||
int len_under;
|
||||
WCHAR *lastBkSlash, *lastFwdSlash, *lastSlash;
|
||||
|
||||
len_ellipsis = strlenW (ELLIPSISW);
|
||||
len_ellipsis = lstrlenW (ELLIPSISW);
|
||||
if (!max_len) return;
|
||||
if (len_ellipsis >= max_len) len_ellipsis = max_len - 1;
|
||||
if (*len_str + len_ellipsis >= max_len)
|
||||
|
@ -249,8 +245,8 @@ static void TEXT_PathEllipsify (HDC hdc, WCHAR *str, unsigned int max_len,
|
|||
*/
|
||||
str[*len_str] = '\0'; /* to simplify things */
|
||||
|
||||
lastBkSlash = strrchrW (str, BACK_SLASH);
|
||||
lastFwdSlash = strrchrW (str, FORWARD_SLASH);
|
||||
lastBkSlash = wcsrchr (str, BACK_SLASH);
|
||||
lastFwdSlash = wcsrchr (str, FORWARD_SLASH);
|
||||
lastSlash = lastBkSlash > lastFwdSlash ? lastBkSlash : lastFwdSlash;
|
||||
if (!lastSlash) lastSlash = str;
|
||||
len_trailing = *len_str - (lastSlash - str);
|
||||
|
@ -915,7 +911,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
|||
|
||||
if (count == -1)
|
||||
{
|
||||
count = strlenW(str);
|
||||
count = lstrlenW(str);
|
||||
if (count == 0)
|
||||
{
|
||||
if( flags & DT_CALCRECT)
|
||||
|
@ -1286,7 +1282,7 @@ BOOL WINAPI GrayStringW( HDC hdc, HBRUSH hbr, GRAYSTRINGPROC gsprc,
|
|||
LPARAM lParam, INT cch, INT x, INT y,
|
||||
INT cx, INT cy )
|
||||
{
|
||||
if (!cch) cch = strlenW( (LPCWSTR)lParam );
|
||||
if (!cch) cch = lstrlenW( (LPCWSTR)lParam );
|
||||
if ((cx == 0 || cy == 0) && cch != -1)
|
||||
{
|
||||
SIZE s;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "winuser.h"
|
||||
#include "user_private.h"
|
||||
#include "controls.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(graphics);
|
||||
|
@ -1599,7 +1598,7 @@ static BOOL UITOOLS_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp
|
|||
if (!lp) return FALSE;
|
||||
|
||||
if(unicode)
|
||||
len = strlenW((LPWSTR)lp);
|
||||
len = lstrlenW((LPWSTR)lp);
|
||||
else
|
||||
len = strlen((LPSTR)lp);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "controls.h"
|
||||
#include "user_private.h"
|
||||
#include "win.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(graphics);
|
||||
|
@ -181,10 +180,10 @@ static const WCHAR *get_default_desktop(void)
|
|||
|
||||
len = (GetModuleFileNameW( 0, buffer, MAX_PATH ));
|
||||
if (!len || len >= MAX_PATH) return defaultW;
|
||||
if ((p = strrchrW( appname, '/' ))) appname = p + 1;
|
||||
if ((p = strrchrW( appname, '\\' ))) appname = p + 1;
|
||||
p = appname + strlenW(appname);
|
||||
strcpyW( p, explorerW );
|
||||
if ((p = wcsrchr( appname, '/' ))) appname = p + 1;
|
||||
if ((p = wcsrchr( appname, '\\' ))) appname = p + 1;
|
||||
p = appname + lstrlenW(appname);
|
||||
lstrcpyW( p, explorerW );
|
||||
|
||||
/* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Explorer */
|
||||
if (!RegOpenKeyW( HKEY_CURRENT_USER, app_defaultsW, &tmpkey ))
|
||||
|
@ -202,7 +201,7 @@ static const WCHAR *get_default_desktop(void)
|
|||
}
|
||||
|
||||
memcpy( buffer, app_defaultsW, 13 * sizeof(WCHAR) ); /* copy only software\\wine */
|
||||
strcpyW( buffer + 13, explorerW );
|
||||
lstrcpyW( buffer + 13, explorerW );
|
||||
|
||||
/* @@ Wine registry key: HKCU\Software\Wine\Explorer */
|
||||
if (!RegOpenKeyW( HKEY_CURRENT_USER, buffer, &appkey ))
|
||||
|
@ -255,13 +254,13 @@ static void dpiaware_init(void)
|
|||
TRACE( "got dpiAwareness=%s\n", debugstr_w(buffer) );
|
||||
for (start = buffer; *start; start = end)
|
||||
{
|
||||
start += strspnW( start, spacesW );
|
||||
if (!(end = strchrW( start, ',' ))) end = start + strlenW(start);
|
||||
start += wcsspn( start, spacesW );
|
||||
if (!(end = wcschr( start, ',' ))) end = start + lstrlenW(start);
|
||||
else *end++ = 0;
|
||||
if ((p = strpbrkW( start, spacesW ))) *p = 0;
|
||||
if ((p = wcspbrk( start, spacesW ))) *p = 0;
|
||||
for (i = 0; i < ARRAY_SIZE(types); i++)
|
||||
{
|
||||
if (strcmpiW( start, types[i] )) continue;
|
||||
if (wcsicmp( start, types[i] )) continue;
|
||||
SetProcessDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i );
|
||||
return;
|
||||
}
|
||||
|
@ -274,9 +273,9 @@ static void dpiaware_init(void)
|
|||
static const WCHAR permonW[] = {'p','e','r',' ','m','o','n','i','t','o','r',0};
|
||||
|
||||
TRACE( "got dpiAware=%s\n", debugstr_w(buffer) );
|
||||
if (!strcmpiW( buffer, trueW ))
|
||||
if (!wcsicmp( buffer, trueW ))
|
||||
SetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_SYSTEM_AWARE );
|
||||
else if (!strcmpiW( buffer, truepmW ) || !strcmpiW( buffer, permonW ))
|
||||
else if (!wcsicmp( buffer, truepmW ) || !wcsicmp( buffer, permonW ))
|
||||
SetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE );
|
||||
else
|
||||
SetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT_UNAWARE );
|
||||
|
@ -300,9 +299,9 @@ static void winstation_init(void)
|
|||
GetStartupInfoW( &info );
|
||||
if (info.lpDesktop && *info.lpDesktop)
|
||||
{
|
||||
buffer = HeapAlloc( GetProcessHeap(), 0, (strlenW(info.lpDesktop) + 1) * sizeof(WCHAR) );
|
||||
strcpyW( buffer, info.lpDesktop );
|
||||
if ((desktop = strchrW( buffer, '\\' )))
|
||||
buffer = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(info.lpDesktop) + 1) * sizeof(WCHAR) );
|
||||
lstrcpyW( buffer, info.lpDesktop );
|
||||
if ((desktop = wcschr( buffer, '\\' )))
|
||||
{
|
||||
*desktop++ = 0;
|
||||
winstation = buffer;
|
||||
|
@ -318,7 +317,7 @@ static void winstation_init(void)
|
|||
{
|
||||
SetProcessWindowStation( handle );
|
||||
/* only WinSta0 is visible */
|
||||
if (!winstation || !strcmpiW( winstation, WinSta0 ))
|
||||
if (!winstation || !wcsicmp( winstation, WinSta0 ))
|
||||
{
|
||||
USEROBJECTFLAGS flags;
|
||||
flags.fInherit = FALSE;
|
||||
|
@ -439,8 +438,8 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reason )
|
|||
void *redir;
|
||||
|
||||
GetSystemDirectoryW( app, MAX_PATH - ARRAY_SIZE( winebootW ));
|
||||
strcatW( app, winebootW );
|
||||
strcpyW( cmdline, app );
|
||||
lstrcatW( app, winebootW );
|
||||
lstrcpyW( cmdline, app );
|
||||
|
||||
if (flags & EWX_FORCE) lstrcatW( cmdline, killW );
|
||||
else
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#define GET_WORD(ptr) (*(const WORD *)(ptr))
|
||||
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
|
||||
|
@ -387,7 +386,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
|
|||
WCHAR *dst;
|
||||
unsigned len;
|
||||
if (!src) return NULL;
|
||||
len = (strlenW(src) + 1) * sizeof(WCHAR);
|
||||
len = (lstrlenW(src) + 1) * sizeof(WCHAR);
|
||||
if ((dst = heap_alloc(len))) memcpy(dst, src, len);
|
||||
return dst;
|
||||
}
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -28,9 +25,9 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "winver.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/asm.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
|
@ -212,7 +209,7 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name,
|
|||
req->dpi = GetDpiForSystem();
|
||||
req->awareness = awareness;
|
||||
if (!(req->atom = get_int_atom_value( name )) && name)
|
||||
wine_server_add_data( req, name, strlenW(name)*sizeof(WCHAR) );
|
||||
wine_server_add_data( req, name, lstrlenW(name)*sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req ))
|
||||
{
|
||||
handle = wine_server_ptr_handle( reply->handle );
|
||||
|
@ -333,7 +330,7 @@ static HWND *list_window_children( HDESK desktop, HWND hwnd, LPCWSTR class, DWOR
|
|||
req->parent = wine_server_user_handle( hwnd );
|
||||
req->tid = tid;
|
||||
req->atom = atom;
|
||||
if (!atom && class) wine_server_add_data( req, class, strlenW(class)*sizeof(WCHAR) );
|
||||
if (!atom && class) wine_server_add_data( req, class, lstrlenW(class)*sizeof(WCHAR) );
|
||||
wine_server_set_reply( req, list, (size-1) * sizeof(user_handle_t) );
|
||||
if (!wine_server_call( req )) count = reply->count;
|
||||
}
|
||||
|
@ -1461,7 +1458,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
|
|||
|
||||
/* are we creating the desktop or HWND_MESSAGE parent itself? */
|
||||
if (className != (LPCWSTR)DESKTOP_CLASS_ATOM &&
|
||||
(IS_INTRESOURCE(className) || strcmpiW( className, messageW )))
|
||||
(IS_INTRESOURCE(className) || wcsicmp( className, messageW )))
|
||||
{
|
||||
DWORD layout;
|
||||
GetProcessDefaultLayout( &layout );
|
||||
|
@ -1975,7 +1972,7 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t
|
|||
|
||||
if (title)
|
||||
{
|
||||
len = strlenW(title) + 1; /* one extra char to check for chars beyond the end */
|
||||
len = lstrlenW(title) + 1; /* one extra char to check for chars beyond the end */
|
||||
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) return 0;
|
||||
}
|
||||
|
||||
|
@ -1995,7 +1992,7 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t
|
|||
{
|
||||
if (InternalGetWindowText( list[i], buffer, len + 1 ))
|
||||
{
|
||||
if (!strcmpiW( buffer, title )) break;
|
||||
if (!wcsicmp( buffer, title )) break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2122,10 +2119,10 @@ HWND WINAPI GetDesktopWindow(void)
|
|||
si.hStdError = GetStdHandle( STD_ERROR_HANDLE );
|
||||
|
||||
GetSystemDirectoryW( windir, MAX_PATH );
|
||||
strcpyW( app, windir );
|
||||
strcatW( app, explorer );
|
||||
strcpyW( cmdline, app );
|
||||
strcatW( cmdline, args );
|
||||
lstrcpyW( app, windir );
|
||||
lstrcatW( app, explorer );
|
||||
lstrcpyW( cmdline, app );
|
||||
lstrcatW( cmdline, args );
|
||||
|
||||
Wow64DisableWow64FsRedirection( &redir );
|
||||
if (CreateProcessW( app, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS,
|
||||
|
@ -2914,7 +2911,7 @@ INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount )
|
|||
{
|
||||
get_server_window_text( hwnd, lpString, nMaxCount );
|
||||
}
|
||||
return strlenW(lpString);
|
||||
return lstrlenW(lpString);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2933,7 +2930,7 @@ INT WINAPI GetWindowTextW( HWND hwnd, LPWSTR lpString, INT nMaxCount )
|
|||
|
||||
/* when window belongs to other process, don't send a message */
|
||||
get_server_window_text( hwnd, lpString, nMaxCount );
|
||||
return strlenW(lpString);
|
||||
return lstrlenW(lpString);
|
||||
}
|
||||
|
||||
|
||||
|
@ -4081,7 +4078,7 @@ BOOL WINAPI GetProcessDefaultLayout( DWORD *layout )
|
|||
if (LOWORD(languages[i]) == MAKELANGID( PRIMARYLANGID(user_lang), SUBLANG_NEUTRAL )) break;
|
||||
if (i == len) i = 0; /* default to the first one */
|
||||
|
||||
sprintfW( buffer, filedescW, LOWORD(languages[i]), HIWORD(languages[i]) );
|
||||
swprintf( buffer, ARRAY_SIZE(buffer), filedescW, LOWORD(languages[i]), HIWORD(languages[i]) );
|
||||
if (!VerQueryValueW( data, buffer, (void **)&str, &len )) goto done;
|
||||
TRACE( "found description %s\n", debugstr_w( str ));
|
||||
if (str[0] == 0x200e && str[1] == 0x200e) version_layout = LAYOUT_RTL;
|
||||
|
|
|
@ -19,21 +19,17 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(win);
|
||||
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "ntstatus.h"
|
||||
|
|
|
@ -19,20 +19,17 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wingdi.h"
|
||||
#include "controls.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/asm.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -524,7 +521,7 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
|
|||
{
|
||||
DWORD len;
|
||||
RtlUnicodeToMultiByteN( (LPSTR)lParam, ~0u, &len,
|
||||
buffer, (strlenW(buffer) + 1) * sizeof(WCHAR) );
|
||||
buffer, (lstrlenW(buffer) + 1) * sizeof(WCHAR) );
|
||||
*result = len - 1;
|
||||
}
|
||||
}
|
||||
|
@ -639,12 +636,12 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
|
|||
|
||||
if (!IS_INTRESOURCE(csW->lpszClass))
|
||||
{
|
||||
class_lenW = (strlenW(csW->lpszClass) + 1) * sizeof(WCHAR);
|
||||
class_lenW = (lstrlenW(csW->lpszClass) + 1) * sizeof(WCHAR);
|
||||
RtlUnicodeToMultiByteSize(&class_lenA, csW->lpszClass, class_lenW);
|
||||
}
|
||||
if (!IS_INTRESOURCE(csW->lpszName))
|
||||
{
|
||||
name_lenW = (strlenW(csW->lpszName) + 1) * sizeof(WCHAR);
|
||||
name_lenW = (lstrlenW(csW->lpszName) + 1) * sizeof(WCHAR);
|
||||
RtlUnicodeToMultiByteSize(&name_lenA, csW->lpszName, name_lenW);
|
||||
}
|
||||
|
||||
|
@ -724,7 +721,7 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
|
|||
{
|
||||
char *ptr, buffer[512];
|
||||
LPCWSTR strW = (LPCWSTR)lParam;
|
||||
DWORD lenA, lenW = (strlenW(strW) + 1) * sizeof(WCHAR);
|
||||
DWORD lenA, lenW = (lstrlenW(strW) + 1) * sizeof(WCHAR);
|
||||
|
||||
RtlUnicodeToMultiByteSize( &lenA, strW, lenW );
|
||||
if ((ptr = get_buffer( buffer, sizeof(buffer), lenA )))
|
||||
|
@ -747,12 +744,12 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
|
|||
|
||||
if (!IS_INTRESOURCE(csW->szTitle))
|
||||
{
|
||||
title_lenW = (strlenW(csW->szTitle) + 1) * sizeof(WCHAR);
|
||||
title_lenW = (lstrlenW(csW->szTitle) + 1) * sizeof(WCHAR);
|
||||
RtlUnicodeToMultiByteSize( &title_lenA, csW->szTitle, title_lenW );
|
||||
}
|
||||
if (!IS_INTRESOURCE(csW->szClass))
|
||||
{
|
||||
class_lenW = (strlenW(csW->szClass) + 1) * sizeof(WCHAR);
|
||||
class_lenW = (lstrlenW(csW->szClass) + 1) * sizeof(WCHAR);
|
||||
RtlUnicodeToMultiByteSize( &class_lenA, csW->szClass, class_lenW );
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "winternl.h"
|
||||
#include "ddk/wdm.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "user_private.h"
|
||||
|
||||
|
@ -70,7 +69,7 @@ static HANDLE get_winstations_dir_handle(void)
|
|||
{
|
||||
HANDLE dir;
|
||||
|
||||
sprintfW( buffer, basenameW, NtCurrentTeb()->Peb->SessionId );
|
||||
swprintf( buffer, ARRAY_SIZE(buffer), basenameW, NtCurrentTeb()->Peb->SessionId );
|
||||
RtlInitUnicodeString( &str, buffer );
|
||||
InitializeObjectAttributes( &attr, &str, 0, 0, NULL );
|
||||
NtOpenDirectoryObject( &dir, DIRECTORY_CREATE_OBJECT | DIRECTORY_TRAVERSE, &attr );
|
||||
|
@ -80,16 +79,18 @@ static HANDLE get_winstations_dir_handle(void)
|
|||
return handle;
|
||||
}
|
||||
|
||||
static WCHAR default_name[29];
|
||||
|
||||
static BOOL WINAPI winstation_default_name_once( INIT_ONCE *once, void *param, void **context )
|
||||
{
|
||||
static const WCHAR fmt[] = {'S','e','r','v','i','c','e','-','0','x','%','x','-','%','x','$',0};
|
||||
WCHAR *name = (WCHAR *)param;
|
||||
TOKEN_STATISTICS stats;
|
||||
BOOL ret;
|
||||
|
||||
ret = GetTokenInformation( GetCurrentProcessToken(), TokenStatistics, &stats, sizeof(stats), NULL );
|
||||
if (ret)
|
||||
sprintfW( name, fmt, stats.AuthenticationId.HighPart, stats.AuthenticationId.LowPart );
|
||||
swprintf( default_name, ARRAY_SIZE(default_name), fmt,
|
||||
stats.AuthenticationId.HighPart, stats.AuthenticationId.LowPart );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -97,11 +98,10 @@ static BOOL WINAPI winstation_default_name_once( INIT_ONCE *once, void *param, v
|
|||
static const WCHAR *get_winstation_default_name( void )
|
||||
{
|
||||
static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
|
||||
static WCHAR name[29];
|
||||
BOOL ret;
|
||||
|
||||
ret = InitOnceExecuteOnce( &once, winstation_default_name_once, name, NULL );
|
||||
return ret ? name : NULL;
|
||||
ret = InitOnceExecuteOnce( &once, winstation_default_name_once, NULL, NULL );
|
||||
return ret ? default_name : NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -130,7 +130,7 @@ HWINSTA WINAPI CreateWindowStationW( LPCWSTR name, DWORD flags, ACCESS_MASK acce
|
|||
LPSECURITY_ATTRIBUTES sa )
|
||||
{
|
||||
HANDLE ret;
|
||||
DWORD len = name ? strlenW(name) : 0;
|
||||
DWORD len = name ? lstrlenW(name) : 0;
|
||||
|
||||
if (len >= MAX_PATH)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ HWINSTA WINAPI CreateWindowStationW( LPCWSTR name, DWORD flags, ACCESS_MASK acce
|
|||
if (!len)
|
||||
{
|
||||
name = get_winstation_default_name();
|
||||
len = strlenW( name );
|
||||
len = lstrlenW( name );
|
||||
}
|
||||
SERVER_START_REQ( create_winstation )
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ HWINSTA WINAPI OpenWindowStationA( LPCSTR name, BOOL inherit, ACCESS_MASK access
|
|||
HWINSTA WINAPI OpenWindowStationW( LPCWSTR name, BOOL inherit, ACCESS_MASK access )
|
||||
{
|
||||
HANDLE ret = 0;
|
||||
DWORD len = name ? strlenW(name) : 0;
|
||||
DWORD len = name ? lstrlenW(name) : 0;
|
||||
if (len >= MAX_PATH)
|
||||
{
|
||||
SetLastError( ERROR_FILENAME_EXCED_RANGE );
|
||||
|
@ -192,7 +192,7 @@ HWINSTA WINAPI OpenWindowStationW( LPCWSTR name, BOOL inherit, ACCESS_MASK acces
|
|||
if (!len)
|
||||
{
|
||||
name = get_winstation_default_name();
|
||||
len = strlenW( name );
|
||||
len = lstrlenW( name );
|
||||
}
|
||||
SERVER_START_REQ( open_winstation )
|
||||
{
|
||||
|
@ -334,7 +334,7 @@ HDESK WINAPI CreateDesktopW( LPCWSTR name, LPCWSTR device, LPDEVMODEW devmode,
|
|||
DWORD flags, ACCESS_MASK access, LPSECURITY_ATTRIBUTES sa )
|
||||
{
|
||||
HANDLE ret;
|
||||
DWORD len = name ? strlenW(name) : 0;
|
||||
DWORD len = name ? lstrlenW(name) : 0;
|
||||
|
||||
if (device || devmode)
|
||||
{
|
||||
|
@ -382,7 +382,7 @@ HDESK WINAPI OpenDesktopA( LPCSTR name, DWORD flags, BOOL inherit, ACCESS_MASK a
|
|||
HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK access )
|
||||
{
|
||||
HANDLE ret = 0;
|
||||
DWORD len = name ? strlenW(name) : 0;
|
||||
DWORD len = name ? lstrlenW(name) : 0;
|
||||
if (len >= MAX_PATH)
|
||||
{
|
||||
SetLastError( ERROR_FILENAME_EXCED_RANGE );
|
||||
|
|
Loading…
Reference in New Issue