oleaut32: Implement ICreateTypeLib2::SetHelpStringContext/SetHelpStringDll.
This commit is contained in:
parent
85d191937b
commit
bc6f1b0ceb
|
@ -152,6 +152,7 @@ typedef struct tagICreateTypeLib2Impl
|
|||
WCHAR *filename;
|
||||
|
||||
MSFT_Header typelib_header;
|
||||
INT helpStringDll;
|
||||
MSFT_pSeg typelib_segdir[MSFT_SEG_MAX];
|
||||
char *typelib_segment_data[MSFT_SEG_MAX];
|
||||
int typelib_segment_block_length[MSFT_SEG_MAX];
|
||||
|
@ -231,6 +232,7 @@ static void ctl2_init_header(
|
|||
This->typelib_header.res48 = 0x80;
|
||||
This->typelib_header.dispatchpos = -1;
|
||||
This->typelib_header.nimpinfos = 0;
|
||||
This->helpStringDll = -1;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -3331,6 +3333,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSaveAllChanges(ICreateTypeLib2 * iface)
|
|||
ctl2_finalize_typeinfos(This, filepos);
|
||||
|
||||
if (!ctl2_write_chunk(hFile, &This->typelib_header, sizeof(This->typelib_header))) return retval;
|
||||
if (This->typelib_header.varflags & HELPDLLFLAG)
|
||||
if (!ctl2_write_chunk(hFile, &This->helpStringDll, sizeof(This->helpStringDll))) return retval;
|
||||
if (!ctl2_write_chunk(hFile, This->typelib_typeinfo_offsets, This->typelib_header.nrtypeinfos * 4)) return retval;
|
||||
if (!ctl2_write_chunk(hFile, &This->typelib_segdir, sizeof(This->typelib_segdir))) return retval;
|
||||
if (!ctl2_write_segment(This, hFile, MSFT_SEG_TYPEINFO )) return retval;
|
||||
|
@ -3401,35 +3405,56 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetCustData(
|
|||
*
|
||||
* Sets a context number for the library help string.
|
||||
*
|
||||
* RETURNS
|
||||
* PARAMS
|
||||
* iface [I] The type library to set the help string context for.
|
||||
* dwContext [I] The help string context.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: E_OUTOFMEMORY or E_INVALIDARG.
|
||||
*/
|
||||
static HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringContext(
|
||||
ICreateTypeLib2 * iface, /* [I] The type library to set the help string context for. */
|
||||
ULONG dwHelpStringContext) /* [I] The help string context. */
|
||||
static
|
||||
HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringContext(ICreateTypeLib2 * iface,
|
||||
ULONG dwContext)
|
||||
{
|
||||
FIXME("(%p,%d), stub!\n", iface, dwHelpStringContext);
|
||||
return E_OUTOFMEMORY;
|
||||
ICreateTypeLib2Impl *This = (ICreateTypeLib2Impl *)iface;
|
||||
|
||||
TRACE("(%p,%d)\n", iface, dwContext);
|
||||
|
||||
This->typelib_header.helpstringcontext = dwContext;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ICreateTypeLib2_SetHelpStringDll {OLEAUT32}
|
||||
*
|
||||
* Sets the DLL used to look up localized help strings.
|
||||
* Set the DLL used to look up localized help strings.
|
||||
*
|
||||
* PARAMS
|
||||
* iface [I] The type library to set the help DLL for.
|
||||
* szDllName [I] The name of the help DLL.
|
||||
*
|
||||
* RETURNS
|
||||
*
|
||||
* Success: S_OK
|
||||
* Failure: E_OUTOFMEMORY or E_INVALIDARG.
|
||||
*/
|
||||
static HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringDll(
|
||||
ICreateTypeLib2 * iface, /* [I] The type library to set the help DLL for. */
|
||||
LPOLESTR szFileName) /* [I] The name of the help DLL. */
|
||||
static
|
||||
HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringDll(ICreateTypeLib2 * iface,
|
||||
LPOLESTR szDllName)
|
||||
{
|
||||
FIXME("(%p,%s), stub!\n", iface, debugstr_w(szFileName));
|
||||
return E_OUTOFMEMORY;
|
||||
ICreateTypeLib2Impl *This = (ICreateTypeLib2Impl *)iface;
|
||||
int offset;
|
||||
|
||||
TRACE("(%p,%s)\n", iface, debugstr_w(szDllName));
|
||||
if (!szDllName)
|
||||
return E_INVALIDARG;
|
||||
|
||||
offset = ctl2_alloc_string(This, szDllName);
|
||||
if (offset == -1)
|
||||
return E_OUTOFMEMORY;
|
||||
This->typelib_header.varflags |= HELPDLLFLAG;
|
||||
This->helpStringDll = offset;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*================== ITypeLib2 Implementation ===================================*/
|
||||
|
|
Loading…
Reference in New Issue