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
c34c6ac2
Commit
c34c6ac2
authored
May 07, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Switch the rest to use the explicit W-types/functions.
Compile with -DWINE_NO_UNICODE_MACROS.
parent
12be9c39
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
Makefile.in
programs/oleview/Makefile.in
+1
-1
interface.c
programs/oleview/interface.c
+23
-23
main.h
programs/oleview/main.h
+2
-2
pane.c
programs/oleview/pane.c
+9
-9
No files found.
programs/oleview/Makefile.in
View file @
c34c6ac2
...
...
@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE
=
oleview.exe
APPMODE
=
-mwindows
IMPORTS
=
uuid comdlg32 comctl32 shell32 oleaut32 ole32 user32 advapi32 kernel32
EXTRADEFS
=
-D
UNICODE
EXTRADEFS
=
-D
WINE_NO_UNICODE_MACROS
C_SRCS
=
\
details.c
\
...
...
programs/oleview/interface.c
View file @
c34c6ac2
...
...
@@ -28,12 +28,12 @@ typedef struct
BOOL
IsInterface
(
HTREEITEM
item
)
{
TVITEM
tvi
;
TVITEM
W
tvi
;
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
W
));
tvi
.
hItem
=
item
;
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
SendMessage
W
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
);
if
(
!
tvi
.
lParam
)
return
FALSE
;
if
(((
ITEM_INFO
*
)
tvi
.
lParam
)
->
cFlag
&
INTERFACE
)
return
TRUE
;
...
...
@@ -43,22 +43,22 @@ BOOL IsInterface(HTREEITEM item)
static
IUnknown
*
GetInterface
(
void
)
{
HTREEITEM
hSelect
;
TVITEM
tvi
;
TVITEM
W
tvi
;
CLSID
clsid
;
IUnknown
*
unk
;
hSelect
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_CARET
,
0
);
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
W
));
tvi
.
hItem
=
hSelect
;
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
SendMessage
W
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
);
CLSIDFromString
(((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
,
&
clsid
);
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
W
));
tvi
.
hItem
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_PARENT
,
(
LPARAM
)
hSelect
);
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
SendMessage
W
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
);
IUnknown_QueryInterface
(((
ITEM_INFO
*
)
tvi
.
lParam
)
->
pU
,
&
clsid
,
(
void
*
)
&
unk
);
...
...
@@ -82,9 +82,9 @@ static INT_PTR CALLBACK InterfaceViewerProc(HWND hDlgWnd, UINT uMsg,
case
WM_INITDIALOG
:
di
=
(
DIALOG_INFO
*
)
lParam
;
hObject
=
GetDlgItem
(
hDlgWnd
,
IDC_LABEL
);
SetWindowText
(
hObject
,
di
->
wszLabel
);
SetWindowText
W
(
hObject
,
di
->
wszLabel
);
hObject
=
GetDlgItem
(
hDlgWnd
,
IDC_IDENTIFIER
);
SetWindowText
(
hObject
,
di
->
wszIdentifier
);
SetWindowText
W
(
hObject
,
di
->
wszIdentifier
);
return
TRUE
;
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
))
{
...
...
@@ -96,22 +96,22 @@ static INT_PTR CALLBACK InterfaceViewerProc(HWND hDlgWnd, UINT uMsg,
hRes
=
IPersistStream_IsDirty
((
IPersistStream
*
)
unk
);
IUnknown_Release
(
unk
);
if
(
hRes
==
S_OK
)
LoadString
(
globals
.
hMainInst
,
IDS_FALSE
,
wszBuf
,
LoadString
W
(
globals
.
hMainInst
,
IDS_FALSE
,
wszBuf
,
sizeof
(
wszBuf
)
/
sizeof
(
wszBuf
[
0
]));
else
LoadString
(
globals
.
hMainInst
,
IDS_TRUE
,
wszBuf
,
else
LoadString
W
(
globals
.
hMainInst
,
IDS_TRUE
,
wszBuf
,
sizeof
(
wszBuf
)
/
sizeof
(
wszBuf
[
0
]));
hObject
=
GetDlgItem
(
hDlgWnd
,
IDC_ISDIRTY
);
SetWindowText
(
hObject
,
wszBuf
);
SetWindowText
W
(
hObject
,
wszBuf
);
return
TRUE
;
case
IDC_GETSIZEMAX_BUTTON
:
unk
=
GetInterface
();
IPersistStream_GetSizeMax
((
IPersistStream
*
)
unk
,
&
size
);
IUnknown_Release
(
unk
);
LoadString
(
globals
.
hMainInst
,
IDS_BYTES
,
wszBuf
,
LoadString
W
(
globals
.
hMainInst
,
IDS_BYTES
,
wszBuf
,
sizeof
(
wszBuf
)
/
sizeof
(
wszBuf
[
0
]));
wsprintfW
(
wszSize
,
wszFormat
,
U
(
size
).
LowPart
,
wszBuf
);
hObject
=
GetDlgItem
(
hDlgWnd
,
IDC_GETSIZEMAX
);
SetWindowText
(
hObject
,
wszSize
);
SetWindowText
W
(
hObject
,
wszSize
);
return
TRUE
;
}
}
...
...
@@ -128,7 +128,7 @@ static void IPersistStreamInterfaceViewer(WCHAR *clsid, WCHAR *wszName)
else
di
.
wszLabel
=
wszName
;
di
.
wszIdentifier
=
clsid
;
DialogBoxParam
(
0
,
MAKEINTRESOURCE
(
DLG_IPERSISTSTREAM_IV
),
DialogBoxParam
W
(
0
,
MAKEINTRESOURCEW
(
DLG_IPERSISTSTREAM_IV
),
globals
.
hMainWnd
,
InterfaceViewerProc
,
(
LPARAM
)
&
di
);
}
...
...
@@ -142,7 +142,7 @@ static void IPersistInterfaceViewer(WCHAR *clsid, WCHAR *wszName)
else
di
.
wszLabel
=
wszName
;
di
.
wszIdentifier
=
clsid
;
DialogBoxParam
(
0
,
MAKEINTRESOURCE
(
DLG_IPERSIST_IV
),
DialogBoxParam
W
(
0
,
MAKEINTRESOURCEW
(
DLG_IPERSIST_IV
),
globals
.
hMainWnd
,
InterfaceViewerProc
,
(
LPARAM
)
&
di
);
}
...
...
@@ -153,13 +153,13 @@ static void DefaultInterfaceViewer(WCHAR *clsid, WCHAR *wszName)
di
.
wszLabel
=
wszName
;
di
.
wszIdentifier
=
clsid
;
DialogBoxParam
(
0
,
MAKEINTRESOURCE
(
DLG_DEFAULT_IV
),
DialogBoxParam
W
(
0
,
MAKEINTRESOURCEW
(
DLG_DEFAULT_IV
),
globals
.
hMainWnd
,
InterfaceViewerProc
,
(
LPARAM
)
&
di
);
}
void
InterfaceViewer
(
HTREEITEM
item
)
{
TVITEM
tvi
;
TVITEM
W
tvi
;
WCHAR
*
clsid
;
WCHAR
wszName
[
MAX_LOAD_STRING
];
WCHAR
wszParent
[
MAX_LOAD_STRING
];
...
...
@@ -170,23 +170,23 @@ void InterfaceViewer(HTREEITEM item)
'0'
,
'0'
,
'0'
,
'0'
,
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'-'
,
'C'
,
'0'
,
'0'
,
'0'
,
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'4'
,
'6'
,
'}'
,
'\0'
};
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
W
));
tvi
.
mask
=
TVIF_TEXT
;
tvi
.
hItem
=
item
;
tvi
.
cchTextMax
=
MAX_LOAD_STRING
;
tvi
.
pszText
=
wszName
;
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
SendMessage
W
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
);
clsid
=
((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
;
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
W
));
tvi
.
mask
=
TVIF_TEXT
;
tvi
.
hItem
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_PARENT
,
(
LPARAM
)
item
);
tvi
.
cchTextMax
=
MAX_LOAD_STRING
;
tvi
.
pszText
=
wszParent
;
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
SendMessage
W
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
);
if
(
!
memcmp
(
clsid
,
wszIPersistStream
,
sizeof
(
wszIPersistStream
)))
IPersistStreamInterfaceViewer
(
clsid
,
wszParent
);
...
...
programs/oleview/main.h
View file @
c34c6ac2
...
...
@@ -138,7 +138,7 @@ void RefreshMenu(HTREEITEM item);
/* pane.c */
BOOL
CreatePanedWindow
(
HWND
hWnd
,
HWND
*
hWndCreated
,
HINSTANCE
hInst
);
BOOL
PaneRegisterClass
(
void
);
BOOL
PaneRegisterClass
W
(
void
);
void
SetLeft
(
HWND
hParent
,
HWND
hWnd
);
void
SetRight
(
HWND
hParent
,
HWND
hWnd
);
...
...
@@ -153,7 +153,7 @@ void ReleaseInst(HTREEITEM item);
/* typelib.c */
BOOL
CreateTypeLibWindow
(
HINSTANCE
hInst
,
WCHAR
*
wszFileName
);
BOOL
TypeLibRegisterClass
(
void
);
BOOL
TypeLibRegisterClass
W
(
void
);
void
UpdateData
(
HTREEITEM
item
);
/* interface.c */
...
...
programs/oleview/pane.c
View file @
c34c6ac2
...
...
@@ -70,7 +70,7 @@ static LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if
(
pt
.
x
>=
GetSplitPos
(
hWnd
)
-
pane
->
size
/
2
&&
pt
.
x
<=
GetSplitPos
(
hWnd
)
+
pane
->
size
/
2
)
SetCursor
(
LoadCursor
(
0
,
IDC_SIZEWE
));
SetCursor
(
LoadCursor
W
(
0
,
(
LPWSTR
)
IDC_SIZEWE
));
break
;
case
WM_LBUTTONDOWN
:
if
((
short
)
LOWORD
(
lParam
)
>=
GetSplitPos
(
hWnd
)
-
pane
->
size
/
2
&&
...
...
@@ -103,8 +103,8 @@ static LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if
((
int
)
wParam
!=
TYPELIB_TREE
)
break
;
switch
(((
LPNMHDR
)
lParam
)
->
code
)
{
case
TVN_SELCHANGED
:
UpdateData
(((
NMTREEVIEW
*
)
lParam
)
->
itemNew
.
hItem
);
case
TVN_SELCHANGED
W
:
UpdateData
(((
NMTREEVIEW
W
*
)
lParam
)
->
itemNew
.
hItem
);
break
;
}
break
;
...
...
@@ -123,22 +123,22 @@ static LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
HeapFree
(
GetProcessHeap
(),
0
,
pane
);
break
;
default:
return
DefWindowProc
(
hWnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hWnd
,
uMsg
,
wParam
,
lParam
);
}
return
0
;
}
BOOL
PaneRegisterClass
(
void
)
BOOL
PaneRegisterClass
W
(
void
)
{
WNDCLASS
wcc
;
WNDCLASS
W
wcc
;
const
WCHAR
wszPaneClass
[]
=
{
'P'
,
'A'
,
'N'
,
'E'
,
'\0'
};
memset
(
&
wcc
,
0
,
sizeof
(
WNDCLASS
));
memset
(
&
wcc
,
0
,
sizeof
(
WNDCLASS
W
));
wcc
.
lpfnWndProc
=
PaneProc
;
wcc
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
);
wcc
.
lpszClassName
=
wszPaneClass
;
if
(
!
RegisterClass
(
&
wcc
))
if
(
!
RegisterClass
W
(
&
wcc
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -149,7 +149,7 @@ BOOL CreatePanedWindow(HWND hWnd, HWND *hWndCreated, HINSTANCE hInst)
PANE
*
pane
;
pane
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PANE
));
*
hWndCreated
=
CreateWindow
(
wszPaneClass
,
NULL
,
WS_CHILD
|
WS_VISIBLE
,
*
hWndCreated
=
CreateWindow
W
(
wszPaneClass
,
NULL
,
WS_CHILD
|
WS_VISIBLE
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
0
,
0
,
hWnd
,
(
HMENU
)
pane
,
hInst
,
NULL
);
if
(
!*
hWndCreated
)
{
...
...
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