Commit 5f6e3c88 authored by Alexandre Julliard's avatar Alexandre Julliard

Authors: Stewart Caie<kyz@uklinux.net>, Jed Wing <jedwin@ugcs.caltech.edu>, Mike…

Authors: Stewart Caie<kyz@uklinux.net>, Jed Wing <jedwin@ugcs.caltech.edu>, Mike McCormack <mike@codeweavers.com> Added an implemenation of ITSS.DLL.
parent 47c94c0e
......@@ -1576,6 +1576,7 @@ dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/iphlpapi/Makefile
dlls/iphlpapi/tests/Makefile
dlls/itss/Makefile
dlls/kernel/Makefile
dlls/kernel/tests/Makefile
dlls/lzexpand/Makefile
......
......@@ -63,6 +63,7 @@ BASEDIRS = \
imagehlp \
imm32 \
iphlpapi \
itss \
kernel \
lzexpand \
mapi32 \
......@@ -287,6 +288,7 @@ SYMLINKS_SO = \
imagehlp.dll.so \
imm32.dll.so \
iphlpapi.dll.so \
itss.dll.so \
joystick.drv.so \
kernel32.dll.so \
libdxerr8.a \
......@@ -578,6 +580,9 @@ imm.dll.so : imm32.dll.so
iphlpapi.dll.so: iphlpapi/iphlpapi.dll.so
$(RM) $@ && $(LN_S) iphlpapi/iphlpapi.dll.so $@
itss.dll.so: itss/itss.dll.so
$(RM) $@ && $(LN_S) itss/itss.dll.so $@
joystick.drv.so: winmm/joystick/joystick.drv.so
$(RM) $@ && $(LN_S) winmm/joystick/joystick.drv.so $@
......@@ -1013,6 +1018,7 @@ IMPORT_LIBS = \
libimagehlp.$(IMPLIBEXT) \
libimm32.$(IMPLIBEXT) \
libiphlpapi.$(IMPLIBEXT) \
libitss.$(IMPLIBEXT) \
libkernel32.$(IMPLIBEXT) \
liblz32.$(IMPLIBEXT) \
libmapi32.$(IMPLIBEXT) \
......@@ -1348,6 +1354,11 @@ libiphlpapi.def: iphlpapi/iphlpapi.spec.def
libiphlpapi.a: iphlpapi/iphlpapi.spec.def
$(DLLTOOL) -k -l $@ -d iphlpapi/iphlpapi.spec.def
libitss.def: itss/itss.spec.def
$(RM) $@ && $(LN_S) itss/itss.spec.def $@
libitss.a: itss/itss.spec.def
$(DLLTOOL) -k -l $@ -d itss/itss.spec.def
libkernel32.def: kernel/kernel32.spec.def
$(RM) $@ && $(LN_S) kernel/kernel32.spec.def $@
libkernel32.a: kernel/kernel32.spec.def
......@@ -1759,6 +1770,7 @@ icmp/icmp.spec.def: $(WINEBUILD)
imagehlp/imagehlp.spec.def: $(WINEBUILD)
imm32/imm32.spec.def: $(WINEBUILD)
iphlpapi/iphlpapi.spec.def: $(WINEBUILD)
itss/itss.spec.def: $(WINEBUILD)
kernel/kernel32.spec.def: $(WINEBUILD)
lzexpand/lz32.spec.def: $(WINEBUILD)
mapi32/mapi32.spec.def: $(WINEBUILD)
......@@ -1891,6 +1903,7 @@ msacm/imaadp32/imaadp32.acm.so: msacm/imaadp32
imagehlp/imagehlp.dll.so: imagehlp
imm32/imm32.dll.so: imm32
iphlpapi/iphlpapi.dll.so: iphlpapi
itss/itss.dll.so: itss
winmm/joystick/joystick.drv.so: winmm/joystick
kernel/kernel32.dll.so: kernel
lzexpand/lz32.dll.so: lzexpand
......
Makefile
itss.dll.dbg.c
itss.spec.def
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = itss.dll
IMPORTS = ole32 user32 advapi32 kernel32 ntdll
EXTRALIBS = $(LIBUNICODE) -luuid
EXTRADEFS = -DCOM_NO_WINDOWS_H
C_SRCS = \
chm_lib.c \
lzx.c \
itss.c \
moniker.c \
storage.c
IDL_SRCS = \
itss.idl
@MAKE_DLL_RULES@
.SUFFIXES: .idl .h
.idl.h:
$(WIDL) $(IDLFLAGS) -b -h -H $@ $<
idl: $(IDL_SRCS:.idl=.h)
### Dependencies:
/* $Id$ */
/***************************************************************************
* chm_lib.h - CHM archive manipulation routines *
* ------------------- *
* *
* author: Jed Wing <jedwin@ugcs.caltech.edu> *
* version: 0.3 *
* notes: These routines are meant for the manipulation of microsoft *
* .chm (compiled html help) files, but may likely be used *
* for the manipulation of any ITSS archive, if ever ITSS *
* archives are used for any other purpose. *
* *
* Note also that the section names are statically handled. *
* To be entirely correct, the section names should be read *
* from the section names meta-file, and then the various *
* content sections and the "transforms" to apply to the data *
* they contain should be inferred from the section name and *
* the meta-files referenced using that name; however, all of *
* the files I've been able to get my hands on appear to have *
* only two sections: Uncompressed and MSCompressed. *
* Additionally, the ITSS.DLL file included with Windows does *
* not appear to handle any different transforms than the *
* simple LZX-transform. Furthermore, the list of transforms *
* to apply is broken, in that only half the required space *
* is allocated for the list. (It appears as though the *
* space is allocated for ASCII strings, but the strings are *
* written as unicode. As a result, only the first half of *
* the string appears.) So this is probably not too big of *
* a deal, at least until CHM v4 (MS .lit files), which also *
* incorporate encryption, of some description. *
***************************************************************************/
/***************************************************************************
* *
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2.1 of the *
* License, or (at your option) any later version. *
* *
***************************************************************************/
#ifndef INCLUDED_CHMLIB_H
#define INCLUDED_CHMLIB_H
typedef ULONGLONG LONGUINT64;
typedef LONGLONG LONGINT64;
/* the two available spaces in a CHM file */
/* N.B.: The format supports arbitrarily many spaces, but only */
/* two appear to be used at present. */
#define CHM_UNCOMPRESSED (0)
#define CHM_COMPRESSED (1)
/* structure representing an ITS (CHM) file stream */
struct chmFile;
/* structure representing an element from an ITS file stream */
#define CHM_MAX_PATHLEN (256)
struct chmUnitInfo
{
LONGUINT64 start;
LONGUINT64 length;
int space;
WCHAR path[CHM_MAX_PATHLEN+1];
};
struct chmFile* chm_openW(const WCHAR *filename);
/* close an ITS archive */
void chm_close(struct chmFile *h);
/* methods for ssetting tuning parameters for particular file */
#define CHM_PARAM_MAX_BLOCKS_CACHED 0
void chm_set_param(struct chmFile *h,
int paramType,
int paramVal);
/* resolve a particular object from the archive */
#define CHM_RESOLVE_SUCCESS (0)
#define CHM_RESOLVE_FAILURE (1)
int chm_resolve_object(struct chmFile *h,
const WCHAR *objPath,
struct chmUnitInfo *ui);
/* retrieve part of an object from the archive */
LONGINT64 chm_retrieve_object(struct chmFile *h,
struct chmUnitInfo *ui,
unsigned char *buf,
LONGUINT64 addr,
LONGINT64 len);
/* enumerate the objects in the .chm archive */
typedef int (*CHM_ENUMERATOR)(struct chmFile *h,
struct chmUnitInfo *ui,
void *context);
#define CHM_ENUMERATE_NORMAL (1)
#define CHM_ENUMERATE_META (2)
#define CHM_ENUMERATE_SPECIAL (4)
#define CHM_ENUMERATE_FILES (8)
#define CHM_ENUMERATE_DIRS (16)
#define CHM_ENUMERATE_ALL (31)
#define CHM_ENUMERATOR_FAILURE (0)
#define CHM_ENUMERATOR_CONTINUE (1)
#define CHM_ENUMERATOR_SUCCESS (2)
int chm_enumerate(struct chmFile *h,
int what,
CHM_ENUMERATOR e,
void *context);
int chm_enumerate_dir(struct chmFile *h,
const WCHAR *prefix,
int what,
CHM_ENUMERATOR e,
void *context);
#endif /* INCLUDED_CHMLIB_H */
/*
* Copyright (C) 2004 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import "oaidl.idl";
typedef struct _ITS_Control_Data
{
UINT cdwControlData;
UINT adwControlData[1];
} ITS_Control_Data, *PITS_Control_Data;
typedef enum ECompactionLev {
COMPACT_DATA = 0,
COMPACT_DATA_AND_PATH
} ECompactionLev;
[
object,
pointer_default(unique)
]
interface IITStorage : IUnknown
{
HRESULT StgCreateDocfile(
[in] const WCHAR * pwcsName,
[in] DWORD grfMode,
[in] DWORD reserved,
[out] IStorage ** ppstgOpen);
HRESULT StgCreateDocfileOnILockBytes(
[in] ILockBytes * plkbyt,
[in] DWORD grfMode,
[in] DWORD reserved,
[out] IStorage ** ppstgOpen);
HRESULT StgIsStorageFile(
[in] const WCHAR * pwcsName);
HRESULT StgIsStorageILockBytes(
[in] ILockBytes * plkbyt);
HRESULT StgOpenStorage(
[in] const WCHAR * pwcsName,
[in] IStorage * pstgPriority,
[in] DWORD grfMode,
[in] SNB snbExclude,
[in] DWORD reserved,
[out] IStorage ** ppstgOpen);
HRESULT StgOpenStorageOnILockBytes(
[in] ILockBytes * plkbyt,
[in] IStorage * pStgPriority,
[in] DWORD grfMode,
[in] SNB snbExclude,
[in] DWORD reserved,
[out] IStorage ** ppstgOpen);
HRESULT StgSetTimes(
[in] WCHAR const * lpszName,
[in] FILETIME const * pctime,
[in] FILETIME const * patime,
[in] FILETIME const * pmtime);
HRESULT SetControlData(
[in] PITS_Control_Data pControlData);
HRESULT DefaultControlData(
[out] PITS_Control_Data * ppControlData);
HRESULT Compact(
[in] const WCHAR * pwcsName,
[in] ECompactionLev iLev);
}
cpp_quote("DEFINE_GUID(CLSID_ITStorage,0x5d02926a,0x212e,0x11d0,0x9d,0xf9,0x00,0xa0,0xc9,0x22,0xe6,0xec );");
cpp_quote("DEFINE_GUID(IID_IITStorage, 0x88cc31de, 0x27ab, 0x11d0, 0x9d, 0xf9, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xec);");
@ stdcall -private DllCanUnloadNow() ITSS_DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr) ITSS_DllGetClassObject
@ stub DllInstall
@ stdcall -private DllRegisterServer() ITSS_DllRegisterServer
@ stub DllUnregisterServer
This diff is collapsed. Click to expand it.
/* $Id$ */
/***************************************************************************
* lzx.h - LZX decompression routines *
* ------------------- *
* *
* maintainer: Jed Wing <jedwin@ugcs.caltech.edu> *
* source: modified lzx.c from cabextract v0.5 *
* notes: This file was taken from cabextract v0.5, which was, *
* itself, a modified version of the lzx decompression code *
* from unlzx. *
***************************************************************************/
/***************************************************************************
* *
* Copyright(C) Stuart Caie *
* *
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2.1 of the *
* License, or (at your option) any later version. *
* *
***************************************************************************/
#ifndef INCLUDED_LZX_H
#define INCLUDED_LZX_H
/* return codes */
#define DECR_OK (0)
#define DECR_DATAFORMAT (1)
#define DECR_ILLEGALDATA (2)
#define DECR_NOMEMORY (3)
/* opaque state structure */
struct LZXstate;
/* create an lzx state object */
struct LZXstate *LZXinit(int window);
/* destroy an lzx state object */
void LZXteardown(struct LZXstate *pState);
/* reset an lzx stream */
int LZXreset(struct LZXstate *pState);
/* decompress an LZX compressed block */
int LZXdecompress(struct LZXstate *pState,
unsigned char *inpos,
unsigned char *outpos,
int inlen,
int outlen);
#endif /* INCLUDED_LZX_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment