Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
79d850f2
Commit
79d850f2
authored
Jun 12, 2000
by
Juergen Schmied
Committed by
Alexandre Julliard
Jun 12, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implemented Get/SetThreadLocale
- added comment about OleErrorInfo field in TEB
parent
45bd6123
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
15 deletions
+31
-15
errorinfo.c
dlls/ole32/errorinfo.c
+3
-0
thread.h
include/thread.h
+2
-2
process.c
scheduler/process.c
+0
-9
thread.c
scheduler/thread.c
+26
-4
No files found.
dlls/ole32/errorinfo.c
View file @
79d850f2
...
...
@@ -3,6 +3,9 @@
*
* Copyright 2000 Patrik Stridvall
*
*
* The errorinfo is a per-thread object. The reference is stored in the
* TEB at offset 0xf80
*/
#include "debugtools.h"
...
...
include/thread.h
View file @
79d850f2
...
...
@@ -75,7 +75,7 @@ typedef struct _TEB
WORD
thunk_ss
;
/* --n 84 Yet another 16-bit stack selector */
WORD
pad3
;
/* --n 86 */
DWORD
pad4
[
15
];
/* --n 88 */
ULONG
CurrentLocale
;
/* -2
n
C4 */
ULONG
CurrentLocale
;
/* -2
-
C4 */
DWORD
pad5
[
48
];
/* --n C8 */
DWORD
delta_priority
;
/* 1-n 188 Priority delta */
DWORD
unknown4
[
7
];
/* d-n 18c Unknown */
...
...
@@ -107,7 +107,7 @@ typedef struct _TEB
DWORD
pad8
[
3
];
/* --n f10 */
PVOID
ReservedForNtRpc
;
/* -2- f1c used by rpcrt4 */
DWORD
pad9
[
24
];
/* --n f20 */
PVOID
ReservedForOle
;
/* -2- f80 used by ole32 */
PVOID
ReservedForOle
;
/* -2- f80 used by ole32
(IErrorInfo*)
*/
}
TEB
;
/* Thread exception flags */
...
...
scheduler/process.c
View file @
79d850f2
...
...
@@ -1007,15 +1007,6 @@ DWORD WINAPI MapProcessHandle( HANDLE handle )
}
/***********************************************************************
* GetThreadLocale (KERNEL32.295)
*/
LCID
WINAPI
GetThreadLocale
(
void
)
{
return
PROCESS_Current
()
->
locale
;
}
/***********************************************************************
* SetPriorityClass (KERNEL32.503)
*/
BOOL
WINAPI
SetPriorityClass
(
HANDLE
hprocess
,
DWORD
priorityclass
)
...
...
scheduler/thread.c
View file @
79d850f2
...
...
@@ -30,6 +30,7 @@
#include "debugtools.h"
#include "queue.h"
#include "hook.h"
#include "winnls.h"
DEFAULT_DEBUG_CHANNEL
(
thread
);
...
...
@@ -296,6 +297,7 @@ HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, DWORD stack,
teb
->
entry_arg
=
param
;
teb
->
startup
=
THREAD_Start
;
teb
->
htask16
=
GetCurrentTask
();
teb
->
CurrentLocale
=
GetUserDefaultLCID
();
/* for threads in user context */
if
(
id
)
*
id
=
(
DWORD
)
tid
;
if
(
SYSDEPS_SpawnThread
(
teb
)
==
-
1
)
{
...
...
@@ -810,6 +812,16 @@ VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost )
FIXME
(
"(0x%08lx,%d): stub
\n
"
,
threadId
,
boost
);
}
/***********************************************************************
* GetThreadLocale (KERNEL32.295)
*/
LCID
WINAPI
GetThreadLocale
(
void
)
{
return
NtCurrentTeb
()
->
CurrentLocale
;
}
/**********************************************************************
* SetThreadLocale [KERNEL32.671] Sets the calling threads current locale.
*
...
...
@@ -817,14 +829,24 @@ VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost )
* Success: TRUE
* Failure: FALSE
*
*
NOTES
*
Implemented in NT only (3.1 and above according to MS
*
FIXME
*
check if lcid is a valid cp
*/
BOOL
WINAPI
SetThreadLocale
(
LCID
lcid
)
/* [in] Locale identifier */
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
switch
(
lcid
)
{
case
LOCALE_SYSTEM_DEFAULT
:
lcid
=
GetSystemDefaultLCID
();
break
;
case
LOCALE_USER_DEFAULT
:
case
LOCALE_NEUTRAL
:
lcid
=
GetUserDefaultLCID
();
break
;
}
NtCurrentTeb
()
->
CurrentLocale
=
lcid
;
return
TRUE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment