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
bbfe59bc
Commit
bbfe59bc
authored
Jul 01, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Try the Windows help directory if the specified file does not exist.
parent
28f91290
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
chm.c
dlls/hhctrl.ocx/chm.c
+5
-4
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+30
-2
No files found.
dlls/hhctrl.ocx/chm.c
View file @
bbfe59bc
...
...
@@ -362,15 +362,16 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
/* Opens the CHM file for reading */
CHMInfo
*
OpenCHM
(
LPCWSTR
szFile
)
{
WCHAR
file
[
MAX_PATH
]
=
{
0
};
HRESULT
hres
;
CHMInfo
*
ret
;
static
const
WCHAR
wszSTRINGS
[]
=
{
'#'
,
'S'
,
'T'
,
'R'
,
'I'
,
'N'
,
'G'
,
'S'
,
0
};
CHMInfo
*
ret
=
heap_alloc_zero
(
sizeof
(
CHMInfo
));
if
(
!
(
ret
=
heap_alloc_zero
(
sizeof
(
CHMInfo
))))
return
NULL
;
GetFullPathNameW
(
szFile
,
sizeof
(
file
)
/
sizeof
(
file
[
0
]),
file
,
NULL
);
ret
->
szFile
=
strdupW
(
file
)
;
if
(
!
(
ret
->
szFile
=
strdupW
(
szFile
)))
return
NULL
;
hres
=
CoCreateInstance
(
&
CLSID_ITStorage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IITStorage
,
(
void
**
)
&
ret
->
pITStorage
)
;
...
...
dlls/hhctrl.ocx/hhctrl.c
View file @
bbfe59bc
...
...
@@ -86,11 +86,27 @@ static const char *command_to_string(UINT command)
#undef X
}
static
BOOL
resolve_filename
(
const
WCHAR
*
filename
,
WCHAR
*
fullname
,
DWORD
buflen
)
{
static
const
WCHAR
helpW
[]
=
{
'\\'
,
'h'
,
'e'
,
'l'
,
'p'
,
'\\'
,
0
};
GetFullPathNameW
(
filename
,
buflen
,
fullname
,
NULL
);
if
(
GetFileAttributesW
(
fullname
)
==
INVALID_FILE_ATTRIBUTES
)
{
GetWindowsDirectoryW
(
fullname
,
buflen
);
strcatW
(
fullname
,
helpW
);
strcatW
(
fullname
,
filename
);
}
return
(
GetFileAttributesW
(
fullname
)
!=
INVALID_FILE_ATTRIBUTES
);
}
/******************************************************************
* HtmlHelpW (HHCTRL.OCX.15)
*/
HWND
WINAPI
HtmlHelpW
(
HWND
caller
,
LPCWSTR
filename
,
UINT
command
,
DWORD_PTR
data
)
{
WCHAR
fullname
[
MAX_PATH
];
TRACE
(
"(%p, %s, command=%s, data=%lx)
\n
"
,
caller
,
debugstr_w
(
filename
),
command_to_string
(
command
),
data
);
...
...
@@ -120,7 +136,13 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
index
+=
2
;
/* advance beyond "::" for calling NavigateToChm() later */
}
info
=
CreateHelpViewer
(
filename
);
if
(
!
resolve_filename
(
filename
,
fullname
,
MAX_PATH
))
{
WARN
(
"can't find %s
\n
"
,
debugstr_w
(
filename
));
return
0
;
}
info
=
CreateHelpViewer
(
fullname
);
if
(
!
info
)
return
NULL
;
...
...
@@ -142,7 +164,13 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
if
(
!
filename
)
return
NULL
;
info
=
CreateHelpViewer
(
filename
);
if
(
!
resolve_filename
(
filename
,
fullname
,
MAX_PATH
))
{
WARN
(
"can't find %s
\n
"
,
debugstr_w
(
filename
));
return
0
;
}
info
=
CreateHelpViewer
(
fullname
);
if
(
!
info
)
return
NULL
;
...
...
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