Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b9b940fa
Commit
b9b940fa
authored
Nov 01, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Support using a name to destroy a window class too.
parent
0762d98f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
15 deletions
+24
-15
class.c
dlls/user32/class.c
+12
-11
server_protocol.h
include/wine/server_protocol.h
+2
-1
class.c
server/class.c
+6
-2
protocol.def
server/protocol.def
+1
-0
trace.c
server/trace.c
+3
-1
No files found.
dlls/user32/class.c
View file @
b9b940fa
...
...
@@ -573,8 +573,15 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
*/
BOOL
WINAPI
UnregisterClassA
(
LPCSTR
className
,
HINSTANCE
hInstance
)
{
ATOM
atom
=
HIWORD
(
className
)
?
GlobalFindAtomA
(
className
)
:
LOWORD
(
className
);
return
UnregisterClassW
(
(
LPCWSTR
)
MAKEINTATOM
(
atom
),
hInstance
);
if
(
!
IS_INTRESOURCE
(
className
))
{
WCHAR
name
[
MAX_ATOM_LEN
+
1
];
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
className
,
-
1
,
name
,
MAX_ATOM_LEN
+
1
))
return
FALSE
;
return
UnregisterClassW
(
name
,
hInstance
);
}
return
UnregisterClassW
(
(
LPCWSTR
)
className
,
hInstance
);
}
/***********************************************************************
...
...
@@ -583,20 +590,14 @@ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
BOOL
WINAPI
UnregisterClassW
(
LPCWSTR
className
,
HINSTANCE
hInstance
)
{
CLASS
*
classPtr
=
NULL
;
ATOM
atom
=
HIWORD
(
className
)
?
GlobalFindAtomW
(
className
)
:
LOWORD
(
className
);
TRACE
(
"%s %p %x
\n
"
,
debugstr_w
(
className
),
hInstance
,
atom
);
if
(
!
atom
)
{
SetLastError
(
ERROR_CLASS_DOES_NOT_EXIST
);
return
FALSE
;
}
TRACE
(
"%s %p
\n
"
,
debugstr_w
(
className
),
hInstance
);
SERVER_START_REQ
(
destroy_class
)
{
req
->
atom
=
atom
;
req
->
instance
=
hInstance
;
if
(
IS_INTRESOURCE
(
className
))
req
->
atom
=
LOWORD
(
className
);
else
wine_server_add_data
(
req
,
className
,
strlenW
(
className
)
*
sizeof
(
WCHAR
)
);
if
(
!
wine_server_call_err
(
req
))
classPtr
=
reply
->
client_ptr
;
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
b9b940fa
...
...
@@ -3609,6 +3609,7 @@ struct destroy_class_request
struct
request_header
__header
;
atom_t
atom
;
void
*
instance
;
/* VARARG(name,unicode_str); */
};
struct
destroy_class_reply
{
...
...
@@ -4882,6 +4883,6 @@ union generic_reply
struct
set_completion_info_reply
set_completion_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 32
5
#define SERVER_PROTOCOL_VERSION 32
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/class.c
View file @
b9b940fa
...
...
@@ -186,9 +186,13 @@ DECL_HANDLER(create_class)
/* destroy a window class */
DECL_HANDLER
(
destroy_class
)
{
struct
window_class
*
class
=
find_class
(
current
->
process
,
req
->
atom
,
req
->
instance
);
struct
window_class
*
class
;
atom_t
atom
=
req
->
atom
;
if
(
get_req_data_size
())
atom
=
find_global_atom
(
NULL
,
get_req_data
(),
get_req_data_size
()
/
sizeof
(
WCHAR
)
);
if
(
!
class
)
if
(
!
(
class
=
find_class
(
current
->
process
,
atom
,
req
->
instance
))
)
set_win32_error
(
ERROR_CLASS_DOES_NOT_EXIST
);
else
if
(
class
->
count
)
set_win32_error
(
ERROR_CLASS_HAS_WINDOWS
);
...
...
server/protocol.def
View file @
b9b940fa
...
...
@@ -2610,6 +2610,7 @@ enum message_type
@REQ(destroy_class)
atom_t atom; /* class atom */
void* instance; /* module instance */
VARARG(name,unicode_str); /* class name */
@REPLY
void* client_ptr; /* pointer to class in client address space */
@END
...
...
server/trace.c
View file @
b9b940fa
...
...
@@ -3205,7 +3205,9 @@ static void dump_create_class_reply( const struct create_class_reply *req )
static
void
dump_destroy_class_request
(
const
struct
destroy_class_request
*
req
)
{
fprintf
(
stderr
,
" atom=%04x,"
,
req
->
atom
);
fprintf
(
stderr
,
" instance=%p"
,
req
->
instance
);
fprintf
(
stderr
,
" instance=%p,"
,
req
->
instance
);
fprintf
(
stderr
,
" name="
);
dump_varargs_unicode_str
(
cur_size
);
}
static
void
dump_destroy_class_reply
(
const
struct
destroy_class_reply
*
req
)
...
...
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