39 DWORD new_strings_size;
46 new_strings =
realloc(chm->
strings, new_strings_size *
sizeof(
char*));
96 static const WCHAR wszSYSTEM[] = {
'#',
'S',
'Y',
'S',
'T',
'E',
'M',0};
100 WARN(
"Could not open #SYSTEM stream: %08lx\n",
hres);
104 IStream_Read(
stream, &ver,
sizeof(ver), &
read);
105 TRACE(
"version is %lx\n", ver);
107 buf_size = 8 *
sizeof(
DWORD);
119 if(
entry.len > buf_size) {
126 buf_size =
entry.len;
196 static const WCHAR wszIVB[] = {
'#',
'I',
'V',
'B',0};
200 WARN(
"Could not open #IVB stream: %08lx\n",
hres);
207 IStream_Release(ivb_stream);
213 IStream_Release(ivb_stream);
241 static const WCHAR periodW[] = {
'.',0};
258 IStream_Release(pStream);
279 if (unhandled_params)
280 FIXME(
"Unsupported fsValidMembers fields: 0x%lx\n", unhandled_params);
283 if (
dst->cbStruct == 0)
368 static const WCHAR toc_extW[] = {
'h',
'h',
'c',0};
369 static const WCHAR index_extW[] = {
'h',
'h',
'k',0};
370 static const WCHAR windowsW[] = {
'#',
'W',
'I',
'N',
'D',
'O',
'W',
'S',0};
377 BOOL fUniCodeStrings;
379 DWORD fsValidMembers;
380 DWORD fsWinProperties;
390 DWORD hwndNavigation;
398 DWORD fsToolBarFlags;
414 memset(&wintype, 0,
sizeof(wintype));
418 hr = IStorage_OpenStream(pStorage, windowsW,
NULL,
STGM_READ, 0, &pStream);
424 hr = IStream_Seek(pStream, liOffset, STREAM_SEEK_SET,
NULL);
428 hr = IStream_Read(pStream, &file_wintype,
sizeof(file_wintype), &cbRead);
436 wintype.
dwStyles = file_wintype.dwStyles;
440 wintype.
iNavWidth = file_wintype.iNavWidth;
441 wintype.
rcHTML = file_wintype.rcHTML;
449 wintype.
tabpos = file_wintype.tabpos;
450 wintype.
idNotify = file_wintype.idNotify;
452 wintype.
cHistory = file_wintype.cHistory;
457 wintype.
rcMinSize = file_wintype.rcMinSize;
463 static const WCHAR defaultwinW[] = {
'd',
'e',
'f',
'a',
'u',
'l',
't',
'w',
'i',
'n',
'\0'};
477 if (!
info->WinType.pszCaption)
483 if (!
info->WinType.pszFile)
485 if (!
info->WinType.pszToc)
487 if (!
info->WinType.pszIndex)
495 IStream_Release(pStream);
502 static const WCHAR its_schema[] = {
'i',
't',
's',
':'};
503 static const WCHAR msits_schema[] = {
'm',
's',
'-',
'i',
't',
's',
':'};
504 static const WCHAR mk_schema[] = {
'm',
'k',
':',
'@',
'M',
'S',
'I',
'T',
'S',
't',
'o',
'r',
'e',
':'};
561 if(parent_chm || chm_file->
chm_file) {
562 hres = IITStorage_StgOpenStorage(
info->pITStorage,
566 WARN(
"Could not open storage: %08lx\n",
hres);
571 IStorage_AddRef(
info->pStorage);
577 WARN(
"Could not open stream: %08lx\n",
hres);
598 WARN(
"Could not open storage to obtain the title for a document.\n");
606 WARN(
"Could not open stream: %08lx\n",
hres);
633 IStream_Release(
str);
635 return document_title;
644 static const WCHAR wszSTRINGS[] = {
'#',
'S',
'T',
'R',
'I',
'N',
'G',
'S',0};
656 &IID_IITStorage, (
void **) &
ret->pITStorage) ;
658 WARN(
"Could not create ITStorage: %08lx\n",
hres);
662 hres = IITStorage_StgOpenStorage(
ret->pITStorage, szFile,
NULL,
665 WARN(
"Could not open storage: %08lx\n",
hres);
669 &
ret->strings_stream);
671 WARN(
"Could not open #STRINGS stream: %08lx\n",
hres);
676 WARN(
"Could not read #SYSTEM\n");
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
CHMInfo * CloseCHM(CHMInfo *chm)
LPWSTR FindContextAlias(CHMInfo *chm, DWORD index)
static void wintype_free(HH_WINTYPEW *wintype)
WCHAR * GetDocumentTitle(CHMInfo *info, LPCWSTR document)
static WCHAR * ConvertChmString(HHInfo *info, DWORD id)
LPCWSTR skip_schema(LPCWSTR url)
static BOOL ReadChmSystem(CHMInfo *chm)
CHMInfo * OpenCHM(LPCWSTR szFile)
void SetChmPath(ChmPath *file, LPCWSTR base_file, LPCWSTR path)
static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
static WCHAR * FindHTMLHelpSetting(HHInfo *info, const WCHAR *extW)
void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override)
BOOL LoadWinTypeFromCHM(HHInfo *info)
IStream * GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
static WCHAR * MergeChmString(LPCWSTR src, WCHAR **dst)
static void strbuf_init(strbuf *buf)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
static const WCHAR empty[1]
static WCHAR * strdupAtoW(const char *str)
static __inline const char * debugstr_an(const char *s, int n)
#define stricmp(_String1, _String2)
static LPWSTR HH_LoadString(DWORD dwID)
void strbuf_free(strbuf_t *buf)
BOOL next_node(stream_t *stream, strbuf_t *buf)
BOOL next_content(stream_t *stream, strbuf_t *buf)
void strbuf_zero(strbuf_t *buf)
void stream_init(stream_t *stream, IStream *str)
void get_node_name(strbuf_t *node, strbuf_t *name)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP wchar_t *__cdecl wcsstr(const wchar_t *, const wchar_t *)
static wchar_t * wcsdup(const wchar_t *str)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static LPWSTR strdupnAtoW(LPCSTR str, LONG lenA)
#define HHWIN_PARAM_CUR_TAB
#define HHWIN_PARAM_EXSTYLES
struct tagHH_WINTYPEW HH_WINTYPEW
#define HHWIN_PARAM_TB_FLAGS
#define HHWIN_PARAM_NAV_WIDTH
#define HHWIN_PARAM_TABPOS
#define HHWIN_PARAM_TABORDER
#define HHWIN_PARAM_INFOTYPES
#define HHWIN_PARAM_SHOWSTATE
#define HHWIN_PARAM_PROPERTIES
#define HHWIN_PROP_TRI_PANE
#define HHWIN_PARAM_EXPANSION
#define HHWIN_PARAM_STYLES
#define HHWIN_PARAM_HISTORY_COUNT
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
static const WCHAR separatorW[]
#define STGM_SHARE_DENY_WRITE
BYTE tabOrder[HH_MAX_TABS+1]
#define LOCALE_IDEFAULTANSICODEPAGE